Solved


Decimation - Optimized for speed
This problem is similar to http://www.mathworks.com/matlabcentral/cody/problems/1092-decimation, only this time the score will b...

5 days ago

Solved


Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

5 days ago

Solved


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

5 days ago

Solved


Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...

6 days ago

Solved


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

6 days ago

Solved


Hofstadter Q sequence
The Hofstadter Q sequence is defined as follows: The first elements of the sequence are 1, 1, 2, 3, 3, 4, 5, 5, 6, 6. Write ...

6 days ago

Solved


Maximizing Stock Profit
As a stock exchange broker focusing on a single transaction, your goal is to maximize profit by buying a stock at a low price an...

6 days ago

Solved


Secret Message and Acrostic
One of the simplest ways to hide a message involves utilizing uppercase letters. Given a text, collect all uppercase letters in...

6 days ago

Solved


ICFP 2024 Programming Contest June 28 thru July 1
This is to announce the annual ICFP programming contest for 2024. The ICFP 2024 homepage link is ICFP 2024 . Registration will...

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

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

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

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

6 days ago

Solved


CamelCase to snake_case convention
The CamelCase naming convention capitalizes the first letter of each word. In snake_case convention, words are written in lowerc...

6 days ago

Solved


snake_case to CamelCase convention
The snake_case naming convention writes words in lowercase and separates them with underscores. In CamelCase convention, the fir...

6 days ago

Solved


Add non-triangular numbers
The nth triangular number is the sum of the first n positive integers. The sequence of triangular numbers starts 1, 3, 6, 10, 15...

6 days ago

Solved


The Prime Days of Christmas
On the first day of Christmas my true love sent to me partridges in a pear tree. On the second day of Christmas my true love s...

6 days ago

Solved


Remove the diagonal of a square matrix
Some Cody problems ask solvers to remove columns (e.g., CP 7), and others ask solvers to remove rows (e.g., CP 44033). Write a...

6 days ago

Solved


Find the number of diagonals in a n sided polygon.
Find the number of diagonals in a n sided polygon.

6 days ago

Solved


Organic Chemistry
Determine the names of the organic component formed with carbon and hydrogen. For example, if n=1 the name is methane

6 days ago

Solved


Wheatstone bridge
Determine if a set of resistors maintain Wheatstone bridge equilibrium

6 days ago

Solved


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

6 days ago

Solved


EZ8
EZ

6 days ago

Solved


EZ4

6 days ago

Solved


EZ5
EZ5

6 days ago

Solved


EZ10
EZ

6 days ago

Solved


EZ7
EZ

6 days ago

Solved


EZ9
EZ

6 days ago

Solved


EZ6

6 days ago

Solved


EZZ
EZZ

6 days ago

Load more