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 years 前
已解决
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 years 前
已解决
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 ...
2 years 前
已解决
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 years 前
已解决
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 years 前
已解决
Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once.
Example:
Input s ...
2 years 前
已解决
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...
2 years 前
已解决
Tic Tac Toe FTW
Given a tic tac toe board:
* 1 represents X
* 0 represents empty.
* -1 represents O
It is X's move. If there is an imme...
2 years 前
已解决
Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...
2 years 前
已解决
Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...
2 years 前
已解决
Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers.
Examples:
[index1 index2] = nearestNumbers([2 5 3...