Rock 'n 'Roll Problems
No, not drugs, alcohol or "the man", but some classic programming brain-teasers with a musical twist.
-
First up, can you feel Nirvana's Love Buzz? Write the code that returns "Love" if the input is divisible by 3, "Buzz" if it is divisible by 5, "Love Buzz" if it is divisible by both. Otherwise return the input.
-
Next, find which of these songs are so devilishly rock 'n' roll you could play their record backwards and it would still make sense. Write the code to determine the palindromes.
-
Next, In the End it does even matter, thank you very much Linkin Park. Write a function to determine whether of these Linkin Park songs share the same 3-character ending.
-
Next, these backwards-inspired songs have found themselves, well, back-to-front. Write the code to reverse them.
-
Finally, TwoSum41. Return the two indices that add up to punk rock's favourite sum, 41.
For each challenge, verify your solution by running the corresponding test class in src/test/java/challenges