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

10달 ago

Solved

Pizza order

A pizza order by phone in diameter d1, pizza will be make only in diameter d2. Return the pizza pieces p should be make.(pizza ...

10달 ago

Solved

Summing Digits within Text

Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

10달 ago

Solved

QWERTY coordinates

Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

10달 ago

Solved

Indexed Probability Table

This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

10달 ago

Solved

Pattern matching

Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

10달 ago

Solved

Alphabetize by last name

Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

10달 ago

Solved

Duplicates

Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

10달 ago

Solved

Make a Palindrome Number

Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

10달 ago

Solved

Find the two most distant points

Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

10달 ago

Solved

Interpolator

You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

10달 ago

Solved

Trimming Spaces

Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

10달 ago

Solved

Elapsed Time

Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

10달 ago

Problem

Pizza order

A pizza order by phone in diameter d1, pizza will be make only in diameter d2. Return the pizza pieces p should be make.(pizza ...

11달 ago | 0

Solved

How to subtract?

*± ± ± ± ± ± ± ± ± ± ±* * Imagine you need to subtract one...

11달 ago

Solved

Area of an equilateral triangle

Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

11달 ago

Solved

Check if number exists in vector

Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

11달 ago

Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

11달 ago

Solved

De-dupe

Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

11달 ago

Solved

Quote Doubler

Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

11달 ago

Solved

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

11달 ago

Solved

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

11달 ago

Solved

Remove the polynomials that have positive real elements of their roots.

The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

11달 ago

Solved

Counting Sequence

Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

11달 ago

Solved

Reverse Run-Length Encoder

Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

11달 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, ...

11달 ago

Solved

Return a list sorted by number of occurrences

Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

11달 ago

Solved

Test for balanced parentheses

Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

11달 ago

Solved

Prime factor digits

Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

11달 ago

Solved

Remove all the words that end with "ain"

Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

11달 ago