Solved


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

5 years ago

Solved


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

5 years ago

Solved


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

5 years ago

Solved


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

5 years ago

Solved


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

5 years ago

Solved


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

5 years ago

Solved


Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

5 years ago

Solved


~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

5 years ago

Solved


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

5 years ago

Solved


Find Logic 32

5 years ago

Problem


Find Logic 32

5 years ago | 2 | 204 solvers

Solved


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

5 years ago

Solved


Find Logic 31

5 years ago

Problem


Find Logic 31

5 years ago | 2 | 194 solvers

Solved


Find Logic 30

5 years ago

Problem


Find Logic 30

5 years ago | 2 | 193 solvers

Solved


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

5 years ago

Solved


Find Logic 27

5 years ago

Problem


Find Logic 27

5 years ago | 2 | 240 solvers

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

5 years ago

Solved


Find Logic 26

5 years ago

Problem


Find Logic 26

5 years ago | 4 | 184 solvers

Solved


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

5 years ago

Solved


Find Logic 26

5 years ago

Problem


Find Logic 26

5 years ago | 1 | 198 solvers

Solved


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

5 years ago

Solved


Find Logic 26

5 years ago

Problem


Find Logic 26

5 years ago | 1 | 239 solvers

Solved


Find Logic 25

5 years ago

Problem


Find Logic 25

5 years ago | 1 | 233 solvers

Load more