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

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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]; ...

ungefär en månad 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 ...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad 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...

ungefär en månad ago

Solved


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

ungefär en månad 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

ungefär en månad ago

Solved


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

ungefär en månad ago

Solved


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

ungefär en månad ago

Solved


EZ8
EZ

ungefär en månad ago

Solved


EZ4

ungefär en månad ago

Solved


EZ5
EZ5

ungefär en månad ago

Solved


EZ10
EZ

ungefär en månad ago

Solved


EZ7
EZ

ungefär en månad ago

Solved


EZ9
EZ

ungefär en månad ago

Solved


EZ6

ungefär en månad ago

Solved


EZZ
EZZ

ungefär en månad ago

Load more