Solved


Proper Factors
Generate the proper factors of input integer x and return them in ascending order. For more information on proper factors, refer...

23 days ago

Solved


Easy Sequences 10: Sum of Cumsums of Fibonacci Sequence
The function F(n) is defined as the set of Fibonacci numbers from the first up to the n-th. S(n) is the result of applying to F,...

23 days ago

Solved


Path of least resistance
Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

23 days ago

Solved


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

23 days ago

Solved


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

23 days ago

Solved


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

23 days ago

Solved


Number of cyles and fixed points in a permutation
A permutation can be constructed from one or more sets of elements in cyclic order. A permutation in a single row vector form ...

23 days ago

Solved


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

23 days ago

Solved


Find the path through the cell
A list of cells is given. Return true if the elements of the list increase monotonically (each element is strictly larger tha...

23 days ago

Solved


Number of paths on a 3d grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

23 days ago

Solved


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

23 days ago

Solved


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

23 days ago

Solved


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

23 days ago

Solved


Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

23 days ago

Solved


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

23 days ago

Solved


Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...

23 days ago

Solved


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

23 days ago

Solved


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

23 days ago

Solved


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...

23 days ago

Solved


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

23 days ago

Solved


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

23 days ago

Solved


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

23 days ago

Solved


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

23 days ago

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

23 days ago

Solved


Coin Distribution - 02
Prev prob <https://www.mathworks.com/matlabcentral/cody/problems/45385-coin-distribution> Given a set of coins and an amount,...

23 days ago

Solved


Coin distribution
Imagine, u r in a shop. ur bill is n(2200). u want to pay the bill with minimum no of coins u have. u've coins of - 2000,1000...

23 days ago

Solved


Is this group simply connected?
Given connectivity information about a graph, your job is to figure out if the graph is fully connected. You are given a list of...

23 days ago

Solved


Quarantine Days
In these quarantine days, a list of what Max may do on a typical day is given in a table with the starting hour to ending hour. ...

23 days ago

Solved


Pseudo-Zernike Polynomials
Problem #1476 deals with Radial Zernike Polynomials. Here, generate the Pseudo-Zernike Polynomials for a given order n and degr...

23 days ago

Solved


Shapiro Polynomials
Given an order n, return the coefficients of 1st Shapiro polynomials Pn(x) - %Example P1(x) = x + 1 => Output = [1 1]; P...

23 days ago

Load more