Gelöst


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

fast 8 Jahre vor

Problem


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

fast 8 Jahre vor | 0 | 87 Lösungsvorschläge

Gelöst


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

fast 8 Jahre vor

Problem


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

fast 8 Jahre vor | 1 | 45 Lösungsvorschläge

Problem


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

fast 8 Jahre vor | 0 | 77 Lösungsvorschläge

Gelöst


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

fast 8 Jahre vor

Problem


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

fast 8 Jahre vor | 0 | 88 Lösungsvorschläge

Gelöst


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?

fast 8 Jahre vor

Problem


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?

fast 8 Jahre vor | 1 | 54 Lösungsvorschläge

Gelöst


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

fast 8 Jahre vor

Problem


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

fast 8 Jahre vor | 0 | 65 Lösungsvorschläge

Gelöst


reversed alphabet
create the alphabet in reverse

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Problem


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

fast 8 Jahre vor | 0 | 21 Lösungsvorschläge

Gelöst


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

fast 8 Jahre vor

Problem


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

fast 8 Jahre vor | 1 | 43 Lösungsvorschläge

Gelöst


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

fast 8 Jahre vor

Problem


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

fast 8 Jahre vor | 0 | 73 Lösungsvorschläge

Gelöst


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

fast 8 Jahre vor

Problem


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

fast 8 Jahre vor | 0 | 84 Lösungsvorschläge

Gelöst


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

fast 8 Jahre vor

Problem


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

fast 8 Jahre vor | 0 | 43 Lösungsvorschläge

Problem


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'

fast 8 Jahre vor | 0 | 35 Lösungsvorschläge

Gelöst


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

fast 8 Jahre vor

Gelöst


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

fast 8 Jahre vor

Gelöst


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

fast 8 Jahre vor

Gelöst


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

fast 8 Jahre vor

Gelöst


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

fast 8 Jahre vor

Gelöst


Binairy invert
given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

fast 8 Jahre vor

Gelöst


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

fast 8 Jahre vor

Mehr laden