Solved


List the households affected by leaks in water distribution
Consider the following water distribution network, where water is pumped uni-directionally from left to right: 8...

1 month ago

Solved


Yoonir - 03
Find the area of a seven-pointed star inscribed in a circle of radius r.

1 month ago

Solved


Maya - 03
Following up on the previous two problems, now you've to add or subtract two Maya numerals. The 3rd input will be a function ...

1 month ago

Solved


Maya - 02
<https://en.wikipedia.org/wiki/Maya_numerals> Prev. prob. - <https://www.mathworks.com/matlabcentral/cody/problems/45375-maya...

1 month ago

Solved


Maya - 01
Given a number, convert it into the Maya numeral system. <https://en.wikipedia.org/wiki/Maya_numerals> For example, n...

1 month ago

Solved


Weighted Convolution
Given two input vectors x = [x_1, x_2, ..., x_K] and y = [y_1, y_2, ..., y_K] of equal length, compute the weighted convolution ...

1 month ago

Solved


Weighted Names
A cell is given which contains several names. You've to return those names sorted by their weight. Weight is to be calculate...

1 month ago

Solved


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

1 month ago

Solved


Determining if a Degree Sequence is Potentially a Graph
A degree sequence is a list of numbers representing the degrees of vertices in a graph. While it is difficult to tell if a graph...

1 month ago

Problem


Spell musical triads
Chords form the basis of harmony in music. The most basic chords are triads, or groups of three notes. They are specified by thr...

1 month ago | 1 | 2 solvers

Solved


Valid Chess Moves
Using standard Algebraic notation ('' for a pawn), given previous move and a next move, output true if it is a valid move or fal...

1 month ago

Solved


Peg Solitaire - Get Possible Moves
About Peg Solitaire. Consider following initial board; (1) indicates there is a peg and (0) indicates empty holes. For thi...

1 month ago

Solved


GJam: 2013 China Event: Cannon Angle
This Challenge is derived from <http://code.google.com/codejam/contest/2933486/dashboard#s=p1 GJam 2013 China Captain Hammer>. T...

1 month 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...

1 month ago

Solved


Matrix Transposition
Given a matrix and an index, perform matrix transposition as follows - Replace non-corner value of ith ring from outside, with...

1 month ago

Solved


SLP Calculation
The SLP Calculation Challenge is to implement SLP sequences and output the result as a string. SLP, Straight Line Program, creat...

1 month ago

Problem


Determine whether a number is practical
A number is practical if all smaller numbers can be written as a sum of the proper divisors of . The number 24 is practical bec...

1 month ago | 2 | 4 solvers

Solved


Define an arithmetic sequence
Given three numbers n, a, and d, define an arithmetic sequence of n terms with a being the initial term of the sequence and d be...

1 month ago

Problem


Solve an ODE: precocious pair’s porcine pursuit
In our previous encounters with Matilda and Labrun, the scintillating siblings collected candy wrappers, amused others with card...

1 month ago | 0 | 3 solvers

Solved


Latest Question On Cody
Get the problem number of the latest submitted Problem on Cody. Copying the test suite code might not help.

1 month ago

Solved


Find the slope of a line that passes through two vectors
Given two vectors p1 and p2, return the slope of a line that passes through p1 and p2. Examples: Input [p1,p2] = deal([0,1],[...

1 month ago

Problem


Generate the Figure-Figure sequence
After discussing Scott Kim’s FIGURE-FIGURE Figure (below) in Gödel, Escher, Bach, Douglas Hofstadter introduced an integer seque...

1 month ago | 2 | 5 solvers

Solved


Ramanujan's Number
About 1729 1729 is the first positive integer which can be expressed as the sum of two positive cubes in two different ways. ...

1 month 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...

2 months ago

Solved


Cellular Automaton | Rule X
Cellular Automata (CA) provide a convenient way to represent many kinds of systems in which the values of cells (either 0 or 1) ...

2 months ago

Solved


Decimal Fraction to binary conversion
Given an fraction decimal number n, convert it to its equivalent binary number. If it is an infinite binary fraction, keep it...

2 months ago

Solved


Check Digit - 02
Given a list of ISBN's, check whether they're valid or not. Prev Prob - <https://www.mathworks.com/matlabcentral/cody/problem...

2 months ago

Solved


Smallest distance between a point and a rectangle
Given two points *x* and *y* placed at opposite corners of a rectangle, find the minimal euclidean distance between another poin...

2 months ago

Solved


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

2 months ago

Solved


NCHOOSEK - Time Optimization
*Input* * *V* —— Set of all choices, a vector of N, 1 < N < 100 * *K* —— Number of selected choices, a scalar, 0 <= K <=...

2 months ago

Load more