Solved


A little bit of luck needed
This one may require a little bit of guess work, but it is possible. Hints: - The same solution might fail the tests once and ...

11 months ago

Solved


Remove the diagonal of a square matrix
Some Cody problems ask solvers to remove columns (e.g., CP 7), and others ask solvers to remove rows (e.g., CP 44033). Write a...

11 months ago

Solved


Palindrome vector
Check if a given vector is Palindrome. Example, [1 2 54 32 45 5 33 456 45 456 33 5 45 32 54 2 1]

11 months ago

Solved


Test x = 1
Write a function to make the variable x = 1

11 months ago

Solved


Division
Given two numbers a and b divide them a/b

11 months ago

Solved


Multiplication
Given 2 numbers a and b mulitply them

11 months ago

Solved


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

11 months ago

Solved


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

11 months ago

Solved


Lights Out 2 - 5x5, 4 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

11 months ago

Solved


Lights Out 1 - 5x5, 3 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

11 months ago

Solved


Most Frequent Word - 01
Given a document file or a character array, find out the most frequent word in that document. In the case of multiple words -...

11 months ago

Solved


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

11 months ago

Solved


You LOVES Matlab 41%
Given two strings, determine the percentage that one loves the other in the following way: YOU LOVES MATLAB there is 1 '...

11 months ago

Solved


Sleeping Queens 1
My youngest daughter received a card game named Sleeping Queens for Christmas this year, and has been playing it nearly non-stop...

11 months ago

Solved


Deduce Equations for Simplified Interstellar Doppler Effect ✨
R2-D2 and C-3PO are friends. R2-D2 boards a spacecraft bound to a galaxy far, far away, but is always in contact with C-3PO, als...

12 months ago

Solved


Mirror, mirror on the wall, who is fairest of them all?
The Elo rating system was featured in the movie *The Social Network* during the <https://www.youtube.com/watch?v=BzZRr4KV59I/ al...

12 months ago

Solved


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

12 months ago

Solved


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

12 months ago

Solved


Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]

12 months ago

Solved


Ratio between sums of prime and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

12 months ago

Solved


Vector creation using colon operator
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use the colon (:) operator.

12 months ago

Solved


Count integers in randomized vector that are multiples of a given number.
The mod() function We might all remember the days when we were taught to divide and then set the remainder aside if the numbers...

12 months ago

Solved


Return part of an array
Given a 5x5 array, return a 3x3 array that contains the cells that are not on the edge of the array: Given this array Return...

12 months ago

Solved


Summing the last column column
Given a matrix, return the sum of the last column of the array.

12 months ago

Solved


The twelve days of Christmas
Traditionally there are twelve days of Christmas to celebrate ("Twelvetide"), typically starting with Christmas Day (25 December...

12 months ago

Solved


How many days?!?
Christmas is coming earlier and earlier each year. Thanks to rampant commercialism and Christmas Creep, "The Twelve Days of Chr...

12 months ago

Solved


Calculate the Damerau-Levenshtein distance between two strings.
<http://www.mathworks.co.uk/matlabcentral/cody/problems/2303-compute-hamming-distances-between-each-pair-of-rows-from-two-input-...

12 months ago

Solved


longest common substring : Skipped character version
Two strings are given. Find the longest common substring between them. The substring characters need not be adjacent. They, howe...

12 months ago

Solved


Path calculation with polynomials
Let a vector x be the input to our function. 1. If a value of an input vector element x is lower than 0, set this value to 0....

12 months ago

Load more