Solved


Filter values in a vector
Cody often benefits from a functional style of programming. For example, your score is often better when you compose multiple fu...

13 years ago

Solved


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

13 years ago

Solved


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

13 years ago

Solved


Convert elements in numeric array into different class
Write a function that converts elements in a numeric array into a different class. Example: a = [1:5]; % class: double b...

13 years ago

Solved


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

13 years ago

Solved


Use of regexp
* Given a string, containing several sentences, such as: * 'I played piano. John played football. Anita went home. Are you safe...

13 years ago

Solved


Convert Roman to Arabic Numerals
Based upon what I see on tv and at the movies, the use of Roman numerals indicates something is important or sophisticated (e.g....

13 years ago

Solved


Visualization of experimental data across a surface
Assume that you have taken data across the surface of a sample, for example sheet resistance. The data is stored in a Nx3 matri...

13 years ago

Solved


Fun Race
* Given two unary functions foo and goo. * Check whether foo(0) runs faster than goo(0). * Output 1 if foo is faster, otherwis...

13 years ago

Solved


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

13 years ago

Solved


Gambler?
Given a handle to a wealth function, confirm within 100 milliseconds 'Millionaire', 'Likely', or 'Gambler', if wealth() returns ...

13 years ago

Solved


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

13 years ago

Solved


compare strings
Given 2 strings and 3 actions (Insert,delete,replace) on characters. Find the difference between two strings. Example: str...

13 years ago

Solved


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

13 years ago

Solved


It's race time again! Write a function that is at least twice as fast as the test suite call of repmat().
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. This must be done in l...

13 years ago

Solved


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

13 years ago

Solved


Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

13 years ago

Solved


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

13 years ago

Solved


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

13 years ago

Solved


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

13 years ago

Solved


Next Lower Power of B
Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is less than or equal to _n_. E...

13 years ago

Solved


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

13 years ago

Solved


Figurate number triangle
Check whether the input matrix is a figurate number triangle: <http://mathworld.wolfram.com/FigurateNumberTriangle.html>

13 years ago

Solved


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

13 years ago

Solved


Longest Divisor Run
Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

13 years ago

Solved


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

13 years ago

Solved


Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

13 years ago

Solved


What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

13 years ago

Solved


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

13 years ago

Solved


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

13 years ago

Load more