Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true.
For example:
random_binary(10,4)
could result in
[1 0 0 1 1 0 0 0 1 0]
This task is related to problem 1089.
This Test suite sucks.. it does not let pass a right solution.........
The test suite does not check that y has n elements.
Return the largest number that is adjacent to a zero
3116 Solvers
Check to see if a Sudoku Puzzle is Solved
232 Solvers
Back to basics 22 - Rotate a matrix
682 Solvers
232 Solvers
Reverse the elements of an array
562 Solvers