A résolu


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

18 jours il y a

A résolu


Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

18 jours il y a

A résolu


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

18 jours il y a

A résolu


Swap between first and last
The idea is to swap between first and last row Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

19 jours il y a

A résolu


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

19 jours il y a

A résolu


Find the nearest value to the given one

environ 2 mois il y a

A résolu


Sort Except Zeros
Sort the numbers in a vector. But the position of zeros should not be changed. Example: sort_except_zeros( [5 3 0 0 2 4] ) == [...

environ 2 mois il y a

A résolu


snake_case to CamelCase convention
The snake_case naming convention writes words in lowercase and separates them with underscores. In CamelCase convention, the fir...

environ 2 mois il y a

A résolu


CamelCase to snake_case convention
The CamelCase naming convention capitalizes the first letter of each word. In snake_case convention, words are written in lowerc...

environ 2 mois il y a

A résolu


Available ingredients + recipe -> number of cakes
Write a function Egg_Milk_Sugar(L, recipe) to determine the maximum number of cakes that can be prepared given a list of availab...

environ 2 mois il y a

A résolu


Sort by absolute value
Given a list of numbers, arrange them in ascending order based on their absolute values. For example, for the list [-30, -5, 1...

environ 2 mois il y a

A résolu


Highest building

environ 2 mois il y a

A résolu


Evened up (or not)
You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

2 mois il y a

A résolu


Matlab Basics II - Determine if an array has a 3rd dimension
For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

3 mois il y a

A résolu


Simple String Concatenation
This is a simple problem involving taking two incoming strings, and outputting the concatenated string with a space separating t...

3 mois il y a

A résolu


Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

3 mois il y a

A résolu


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

3 mois il y a

A résolu


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

3 mois il y a

A résolu


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

3 mois il y a

A résolu


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

3 mois il y a

A résolu


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

3 mois il y a

A résolu


Caesar Cipher: shift a lowercase string
A Caesar cipher shifts every letter forward through the alphabet by a fixed amount, wrapping around from z back to a. Given a...

3 mois il y a

A résolu


varargin
Write a function that can take a diffrent Amount of inputs for every run Which gives you the sum of all Inputs. Example: f(a,b...

3 mois il y a

A résolu


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

3 mois il y a

A résolu


Convert radians to degrees
Given input in radians, output to degrees

3 mois il y a

A résolu


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

3 mois il y a

A résolu


radius of a spherical planet
You just measured its surface area, that is the input.

3 mois il y a

A résolu


Rotate input square matrix 90 degrees CCW without rot90
Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

3 mois il y a

A résolu


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

3 mois il y a

A résolu


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

3 mois il y a

Charger plus