Solved


Sub-sequence - 02
Given two sequences, find the length of the longest common subsequence. a=[1,1,1,1,1,2,3,1,4] b=[2,3,0,0,9,5,4,1] longe...

2 years ago

Solved


Count the primes resulting from changing one digit of a number
If you start with the number 24 and seek primes by changing a single digit, you can find two: 23 and 29. If you start with 130, ...

2 years ago

Solved


Fault in our Stars - 01
Create a ladder pattern with n-steps and b-width. For example, For n=2, b=5 -- the ladder would look like - '* ...

2 years ago

Solved


Checkmate-02
This is an extension of the problem <https://www.mathworks.com/matlabcentral/cody/problems/45238-checkmate> If the king is in...

2 years ago

Solved


Can the knight take out the pawn?
* position of knight = k * position of pawns = p can the knight take out those pawns? * k='Nf4' * p={'g6','g7'} then...

2 years ago

Solved


Castling-01
Given the position of only one player's chess pieces(some of them) on the chessboard, figure out whether castling is valid or no...

2 years ago

Solved


Checkmate
* The positions of different chess pieces are given in a cell *p* . * The position of the king is given as *x* Determine i...

2 years ago

Solved


Bernoulli's Triangle
Generate the bernoulli's triangle upto nth row. <https://mathworld.wolfram.com/BernoulliTriangle.html>

2 years ago

Solved


Solve an easy binary puzzle
A binary puzzle presents a square grid (or matrix) of cells in which each cell must be 0 or 1. The finished puzzle must follow t...

2 years ago

Solved


Play Hocus Focus
The card game Hocus Focus starts by placing twelve cards with wizards face up on a table. The characteristics of the wizards tha...

2 years ago

Solved


Indicate how the Prague astronomical clock strikes the hours
The astronomical clock in Prague has a bell that rings 1, 2, 3, or 4 times. The number of strokes follows the sequence 123432123...

2 years ago

Solved


Convert integers from base 10 to proper primary notation
This problem is the companion to Cody Problem 60782. The proper primary system of expressing non-negative numbers has three digi...

2 years ago

Solved


Express integers in negabinary
Negabinary numbers are written in base -2. For example, the negabinary number 11010 is , or 6 in base 10. In a similar way, -3 i...

2 years ago

Solved


Convert integers from primary notation to base 10
The primary system of expressing numbers has three digits: m, x, and p, which correspond to -1, 0, and 1. The places in a primar...

2 years ago

Solved


Simple addition
Add two numbers using a funciton

2 years ago

Solved


Complete hydraulic geometry relations
Hydraulic geometry relations express the velocity , width , and depth of a river as a function of the discharge (or flow) , whi...

2 years ago

Solved


EZ8
EZ

2 years ago

Solved


EZ9
EZ

2 years ago

Solved


EZ10
EZ

2 years ago

Solved


EZ7
EZ

2 years ago

Solved


EZ6

2 years ago

Solved


EZ4

2 years ago

Solved


EZ5
EZ5

2 years ago

Solved


EZZ
EZZ

2 years ago

Solved


EZ
EZ

2 years ago

Solved


Determine whether a number is a Ludic prime
Ludic numbers are formed by a sieve. Start with a list of the positive integers. Skip 1 and start with 2. Then delete every seco...

2 years ago

Solved


Find the closest canyon prime
My wife and I celebrated our honeymoon and most recent anniversary in Yellowstone and Grand Teton National Parks. After returnin...

2 years ago

Solved


Sum along each diagonal of a matrix
Write a routine that returns the sums along the diagonals of a given matrix, A, where the first diagonal is the bottom left corn...

2 years ago

Solved


TingTing
Output logical "true" if the input is the answer to luck and money$$$. Otherwise, output logical "false".

2 years ago

Solved


Condition number of Kronecker product
Given NxN matrix A and MxM matrix B, where M,N<=1000, write a routine to compute the condition number of kron(A,B).

2 years ago

Load more