what do you do when adjacent digits add up to a 2 digit number?
the end rule is also rather unclear, how comes 'humankind loves dinosaurs' goes like ... 1102,212,32; while 'harrypotter loves voldemort' goes like ... 129,311,42. It seems that either the former should end in 33, or the latter should end in 41...
agreed, i think 'humankind loves dinosaurs' should be 33
Sorry about that. I updated the rules and changed the dinosaur thing. Thank you for point out those errors.
We must compare the frequency of the word 'LOVES' with the word concatenation upper([E,S]) if someone else finds the problem description unclear. And [9,9,9] must become [1,8,1,8], which is also not clear by the description. Notice that this would create an infinite loop, but that's the current solution for this problem.
PS: My first guess was that [9,9,9] should become [1,2,2,6] -> [3,4,1,0] -> [7,5,1]-> 1 8 %, which makes more sense than some cases generating an infinite loop.
Create a function handle that reverses the input arguments of another function handle
Return unique values without sorting
intersection of matrices
Largest Twin Primes
Let's do Markov Chains!
Make an awesome ramp for a tiny motorcycle stuntman
Snakes on a plane
Choose a web site 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 web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office