Solved


self description 2.0
New (and way easier) hacking problem built upon <http://www.mathworks.com/matlabcentral/cody/problems/1969 Alfonso's problem 196...

5 days ago

Solved


Graph Algorithms - 2 : Chromatic Number
Chromatic number of a graph is the minimum number of distinct colors required to color all the vertices of the graph such that n...

5 days ago

Solved


Signal Processing Basic - 1. Stretch a signal
Input vector V is a discrete time signal assuming the first sample is sampled at t=0. This signal has to be stretched in time. ...

5 days ago

Solved


Graph Algorithms - 1 : Length of the largest closed path
An undirected simple graph is given as the form of an adjacency matrix. Find the length of the largest closed path (one that sta...

5 days ago

Solved


Beam me up, Scotty!
It's the mid 22nd century. You, Montgomery Scott, are appointed the chief engineer of the Starship Enterprise. The Starship is...

5 days ago

Solved


Continuous NaNs - I
Remove any continuous NaNs that appear in the array - %Example 1 input = [1 NaN 2 NaN NaN 3 NaN NaN NaN] output = [1 NaN 2 ...

5 days ago

Solved


Sequence Vectorization - II
This is the second part to the question - Sequence Vectorization - I Given an array of Natural numbers, N, return the sequence ...

5 days ago

Solved


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the horizontal concatenat...

5 days ago

Solved


Counting Permutations
In the permutations of the numbers 1 to n, count the number of permutations in which exactly m elements are greater than the pre...

5 days ago

Solved


Repeatitive Summation
Given numeric vectors x, a and b, perform the following operation - a represents a vector of numbers and b represents a vector ...

5 days ago

Solved


Cluster Partition
Given an array (row or column) of numbers, divide the array into consecutive positive/negative numbers. 0 is to be treated inde...

5 days ago

Solved


Canadian Conundrum
After succesfully completing the French Conundrum, you have decided to take a vacation. Your trip is amongst the mighty mountai...

5 days ago

Solved


French Conundrum
The French army is trapped, sorrounded in backwards direction (South and West directions) by enemy traps and ambushes. You are n...

5 days ago

Solved


Sub-Diagonal Sum
Given a (m x n) matrix and a value r {1,-1}, change every element to the sum of the diagonal led by the element. r=1 > regular ...

5 days ago

Solved


Magical Land
Mother Earth has gifted humanity a magical land to help all life on earth, in the shape of a n-sided regular polygon. You, bein...

5 days ago

Solved


Find the standard deviation of non-zero elements in a matrix
Given a matrix A, calculate the sample standard deviation of only the non-zero elements. If there are fewer than 2 non-zero ...

6 days ago

Solved


Parametric Array
Create a row vector, 1xN (Integer, >1), such that the mean of the vector is M (Real number) and the standard deviation of the ...

9 days ago

Solved


Scorer's Function
Evaluate the Scorer's function for a given input. The expected output is Gi(x). Note - The precision will vary for test cases...

9 days ago

Solved


Local Extrema
Given a 2D (m,n>1) matrix, replace an element if it is not a local extrema (minima/maxima), with 0 (zero). The comparison crite...

9 days ago

Solved


Hyperperfect Numbers
A k-hyperperfect number is a natural number n for which the equality n = 1 + k(σ(n) − n − 1) holds, where σ(n) is the divisor ...

9 days ago

Solved


Leyland Primes
A Leyland Number is defined as a number of the form - x^y + y^x, or, x^y - y^x (x,y)>1 Given an array of numbers(>1), check...

9 days ago

Solved


Factor Digits
Check if a given number in an array of numbers is - Equidigital Number - A number that has the same number of digits as the num...

9 days ago

Solved


Matrix Rotation
You are given a 2D matrix of dimension [m,n] and a positive integer r. You have to rotate the matrix r times and print the resul...

9 days ago

Solved


Truncatable Primes
A truncatable prime is a leading digit is successively removed, then all resulting numbers are prime. Wiki When given a number...

10 days ago

Solved


Secure Password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a pass...

12 days ago

Solved


Electric Potential Energy

12 days ago

Solved


Duplicate/Twins
You have to find if someone is present in 2 lists even if there's one orthographic fault in his name. Consider that an orthograp...

12 days ago

Solved


Primitive Root Modulo n
Given a positive integer n > 2, return a vector, v, of positive integers smaller than n that are primitive roots modulo n. If no...

12 days ago

Solved


Snakes and Ladders: Variable Die
This problem is a sequal to Problem 59132 Snakes and Ladders: Average Number of Turns. Instead of a 6-sided die, your function ...

12 days ago

Solved


Snakes and Ladders: Average Number of Turns
In this problem, you will play a single-player variant of the classic game Snakes and Ladders. The rules are as follows: The pl...

12 days ago

Load more