Risolto


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

circa 6 anni fa

Risolto


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 ...

circa 6 anni fa

Risolto


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 ...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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) ...

circa 6 anni fa

Risolto


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...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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...

circa 6 anni fa

Risolto


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...

circa 6 anni fa

Risolto


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?

circa 6 anni fa

Risolto


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...

circa 6 anni fa

Risolto


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' ...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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...

circa 6 anni fa

Risolto


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 ...

circa 6 anni fa

Risolto


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];

circa 6 anni fa

Risolto


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 ...

circa 6 anni fa

Risolto


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 :-)...

circa 6 anni fa

Risolto


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)-...

circa 6 anni fa

Risolto


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'

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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...

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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

circa 6 anni fa

Risolto


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 ...

circa 6 anni fa

Risolto


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...

circa 6 anni fa

Risolto


print 'Hello W0rld'

circa 6 anni fa

Risolto


Factorial

circa 6 anni fa

Risolto


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...

circa 6 anni fa

Carica altro