Solved


The Ultimate Water Challenge ( Expert )
Description: In the previous problems, you were given a target T and asked to find the minimum number of steps to reach it. ...

3 months ago

Solved


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

3 months ago

Solved


Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be placed...

3 months ago

Solved


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

3 months ago

Solved


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

3 months ago

Solved


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

3 months ago

Solved


Compute the bubble popper fidget spinner sequence
A fidget spinner is a toy made of multiple lobes that pivot on a ball bearing. In some, the lobes hold bubble poppers, or rubber...

3 months ago

Solved


List numbers such that every sum of consecutive positive integers ending in those numbers is not prime
The sequence in question in this problem involves numbers such that all sums of consecutive positive integers ending with are ...

3 months ago

Solved


Compute the largest number whose prime factors sum to n
This problem deals with a sequence whose tenth term is 36 because the prime factors of 36 (2, 2, 3, 3) sum to 10. The number 32 ...

3 months ago

Solved


List the Moran numbers
The quotient of a Moran number and its digit sum is prime. For example, 117 and 481 are Moran numbers because 117/(1+1+7) is 13 ...

3 months ago

Solved


List the cuban primes
The number 61 is a cuban prime because it is prime and the difference two cubes, 64 and 125. Write a function to list the cuba...

3 months ago

Solved


The Generalized N-Jug Water Pouring Problem ( Hard )
Description: You are given N water jugs with maximum capacities specified in a vector C = [ c1, c2, c3,.., c_n]. Initially, all...

3 months ago

Solved


Weighted Costs ( Hard )
Different actions have different monetary costs: Fill = $10 , Empty = $5 , Pour = $1 #Note: It's just an example Find the mini...

3 months ago

Solved


Minimal Waste Pouring ( Hard )
Everytime you perform Empty action, water is wasted. Instead of minimizing steps, find the path that minimizes the total volume ...

3 months ago

Solved


The Broken Jug: Constrain ( Hard )
One of your jugs is "broken": it can not be Emptied to the drain. It can only be Filled or Poured to another jug. Input: C, T, ...

3 months ago

Solved


Easy Sequences 40: Quadratic Congruence
Quadratic Congruence is a modular equation of the form: . In this exercise you will be given a vector containing the coefficie...

3 months ago

Solved


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

3 months ago

Solved


The Tortoise and the Hare - 02
Previous problem <https://www.mathworks.com/matlabcentral/cody/problems/45425-the-tortoise-and-the-hare-01> Suppose in an inf...

3 months ago

Solved


Word Ladder
Given a set of words, and two other words - start and destination, Find the smallest chain from start to the destination such...

3 months ago

Solved


Sub-sequence - 03
Given three sequences, find the length of the longest common subsequence. It is similar to the previous problem -- <https...

3 months ago

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

3 months ago

Solved


Sub-sequence - 01
Find the length of the longest increasing subsequence in the given array. a=[2,4,2,1,3,5,6] longest increasing subsequen...

3 months ago

Solved


Chain multiplication - 02
Following up on the problem in 55295, you found the number of multiplications needed to multiply two matrices. Now, you are giv...

3 months ago

Solved


List the Fermi-Dirac primes
The Fermi-Dirac “primes” are prime powers with exponents that are powers of 2. The first nine terms of the sequence are 2, 3, 4,...

3 months ago

Solved


List odd twin composites
Twin primes, or prime numbers that differ by 2 (e.g., 17 and 19, 59 and 61, or 191 and 193), are the subject of several Cody pro...

3 months ago

Solved


List the semiprimes
A semiprime number—or a 2-almost prime—is the product of two prime numbers. The numbers and are semiprimes, but and are not....

3 months ago

Solved


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

3 months ago

Solved


Balanced Ternary Numbers: Easy as |, |-, |o
This problem concerns the so-called <http://en.wikipedia.org/wiki/Balanced_ternary balanced ternary> system for representing num...

3 months ago

Solved


Queen's move
given a number of consecutive moves of queen, check for their validity based on their previous position.... but remember if u g...

3 months ago

Solved


Project Euler 249: Prime Subset Sums
Inspired by Problem 249 of Project Euler. <https://projecteuler.net/problem=249> Let S = {2, 3, 5, ...} be the set of prime ...

3 months ago

Load more