Solved


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

5 years ago

Solved


The last non-zero digit of a factorial
For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

5 years ago

Solved


Kissing Circles-01
Three circles are mutually tangent to each other and also to a line. find the radius of the smallest circle. The radius of th...

5 years ago

Solved


Grazing-02
A cow is tied to an outside corner of a rectangular barn of size (a,b) with a rope of length l. What is the maximum area the cow...

5 years ago

Solved


Grazing-01
A cow is tied to an outside corner of a rectangular barn of size (a,b) with a rope of length l. What is the maximum area the cow...

5 years ago

Solved


Area-07
This is a follow up of the problem <https://www.mathworks.com/matlabcentral/cody/problems/45341-area-06> in this case, fi...

5 years ago

Solved


Area-06
The length of the side of a square is given. Draw 4 quarter-circles inside the square from 4 corners with a radius equal to t...

5 years ago

Solved


mathematics , probability problem
How many different result can we have, rolling k dice?

5 years ago

Solved


Rank of magic square (for beginners)
Compute the rank r of a magic square of order n WITHOUT rank and magic functions.

5 years ago

Solved


another bullseye
create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3...

5 years ago

Solved


generate the matrix
given 3 inputs e.g [2,3,4] -- generate a matrix like below -- [2 2 0 0 0 0 0 0 0; 2 2 0 0 0 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0...

5 years ago

Solved


Find Elements in Range
Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

5 years ago

Solved


Bell Triangle
Form the bell triangle upto nth bell number posotion; * if n=5 * y= [1 0 0 0 0; 1 2 0 0...

5 years ago

Solved


balance vector
Given a non-empty vector x with integer elements. x shall be called balance vector if one can split the elements of x into two g...

5 years ago

Solved


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

5 years ago

Solved


Restricted Subtraction v1
This problem is <https://www.mathworks.com/matlabcentral/cody/problems/45265-restricted-addition-v4 Restricted Addition v4> with...

5 years ago

Solved


Spiral Out - 01
Create a spiral matrix ( clock-wise direction ) of size n. Try to do that without using the built-in function.

5 years ago

Solved


ZigZag - 01
Given a matrix, return the elements that are on the Z form of the matrix. For example - a=[1,2,3; 4,5,6; 7,8,9] ...

5 years ago

Solved


cofactor matrix
given a matrix, find its cofactor matrix <https://en.wikipedia.org/wiki/Minor_(linear_algebra)#Inverse_of_a_matrix>

5 years ago

Solved


Mean number of letters per word (Easy)
Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...

5 years ago

Solved


Count trailing zeros in a primorial
<https://www.mathworks.com/matlabcentral/cody/problems/44068-the-number-of-trailing-zero-digit-of-a-factorial Cody Problem 44068...

5 years ago

Solved


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

5 years ago

Solved


James Bond film count
Twenty-three James Bond films have been produced, in the years 1962, 1963, 1964, 1965, 1967, 1969, 1971, 1973, ... 197...

5 years ago

Solved


Sum of combinations
Input: *X = 40*, *Y = [40 20 10 4]* Output: *Z = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 ...

5 years ago

Solved


Back to basics 24 - Symbolic variables
Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

5 years ago

Solved


Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

5 years ago

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


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

5 years ago

Load more