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 =...
7 years ago
Solved
Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...
7 years ago
Solved
Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>.
The input string will always be provi...
7 years 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...
7 years 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, ...
7 years ago
Solved
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...
7 years 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...
7 years ago
Solved
The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...