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

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

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

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

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

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

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

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

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

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

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

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

12 days 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, ...

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

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

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

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

12 days ago

Solved


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

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

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

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

12 days 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,...

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

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

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

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

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

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

12 days ago

Solved


Crossing to Kissing - Untangle the Lines
Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

12 days ago

Solved


Find mistyped words in text (mixed-up letters)
Mistyped words are a regular occurrence in emails, texts, status updates, and the like. Many times, people send or post a second...

12 days ago

Load more