Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32).
Input a = ' singular value deco...
2年以上 前
解決済み
Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...
2年以上 前
解決済み
Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...
2年以上 前
解決済み
Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...
2年以上 前
解決済み
Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if
x = [1 2...
2年以上 前
解決済み
Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...
2年以上 前
解決済み
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
2年以上 前
解決済み
Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...
Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99.
E...
2年以上 前
解決済み
Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once.
Example:
Input s ...
2年以上 前
解決済み
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false.
Example...