Resuelto


Step up
For given input array, output a array with all elements step up by two

alrededor de 6 años hace

Resuelto


Find minimum and maximum elements of an array
For a given array find minimum and maximum elements of an array and store minimum value in first index of output and maximum in ...

alrededor de 6 años hace

Resuelto


Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

alrededor de 6 años hace

Resuelto


Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order....

alrededor de 6 años hace

Resuelto


Reduce the logic
We have three logical input, x,y and z. The output is: y = ((x&y)|z)&((z|x&y)|(z&y|x))|((x&z)|z)&((y|x&z)|(z&x|y))|(x|y|z) ...

alrededor de 6 años hace

Resuelto


Find the next binary palindrome number
We all know, a *palindrome* is nothing but a number or character which remains the same after the forward or backward alteration...

alrededor de 6 años hace

Resuelto


row removal
Consider a matrix and remove the first row of the matrix.

alrededor de 6 años hace

Resuelto


How many complete pizzas (number 2)
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

alrededor de 6 años hace

Resuelto


How many complete pizzas
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

alrededor de 6 años hace

Resuelto


Counting votes
x is a vector of votes, e.g. x=[1 2 3 2 2 1 3 2 1 2 2 2 2], who is the winner? 1,2,3?

alrededor de 6 años hace

Resuelto


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

alrededor de 6 años hace

Resuelto


Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

alrededor de 6 años hace

Resuelto


Add the positive numbers
Add only the positive numbers of x example: x = [-2 -1 0 1 2 3] the positive numbers are: 1 2 3, so their sum is 6

alrededor de 6 años hace

Resuelto


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

alrededor de 6 años hace

Resuelto


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

alrededor de 6 años hace

Resuelto


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

alrededor de 6 años hace

Resuelto


Odd times even numbers in a matrix
First count the number of odd numbers in x, then the number of even. Return their product. example: x = [1 2] One odd ...

alrededor de 6 años hace

Resuelto


X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

alrededor de 6 años hace

Resuelto


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

alrededor de 6 años hace

Resuelto


String revert
Revert all words in a sting x for example, if x = 'this is a sentence' then y should be 'sentence a is this'

alrededor de 6 años hace

Resuelto


Magnitude of a vector
Given a vector x, what is its magnitude?

alrededor de 6 años hace

Resuelto


sum of ASCII
Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

alrededor de 6 años hace

Resuelto


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

alrededor de 6 años hace

Resuelto


Uniform binary crossover
Given two binary vectors, return the two children by combining the genes of them using a binary crossover mask. More informat...

alrededor de 6 años hace

Resuelto


Calculate time taken by light to reach earth surface
We know the time(seconds) taken by light to reach surface of earth. What if the distance varies yearly or source of light moves ...

alrededor de 6 años hace

Resuelto


Determine the perimeter of a three-quarter circle
If a circle has a diameter of x as an input value, then show the value of the perimeter of the three-quarter circle in output va...

alrededor de 6 años hace

Resuelto


Transform a Decimal number into a Septimal number

alrededor de 6 años hace

Resuelto


print 'Hello W0rld'

alrededor de 6 años hace

Resuelto


Factorial

alrededor de 6 años hace

Resuelto


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

alrededor de 6 años hace

Cargar más