Community Profile

Contact

Top 1% contributor

LS2 searches directories and shows directory listings recursively.

7 downloads

3 years ago

5 years ago

CLIP2 limits the values in an array.

4 downloads

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

Solve this!

4 years ago

Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

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

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

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

An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

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

You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

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

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

<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

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

Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

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

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

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

Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

Load more

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a location from the following list:

See all countries