Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Problem 1
- Reverse all characters in a string.
- 'Only Bob Ate Fresh Gummy Karate Monkeys' => 'syeknoM etaraK ymmuG hserF etA boB ylnO'
- ### Problem 2
- Reverse the order of words in a string.
- 'Only Bob Ate Fresh Gummy Karate Monkeys' => 'Monkeys Karate Gummy Fresh Ate Bob Only'
- ### Problem 3
- Find the maximum value in a list of numbers.
- [1, 1, 7, 2, 3, 4, 4, 4, 5, 5] => 7
- ### Problem 4
- Find the minimum value in a list of numbers.
- [1, 1, 2, 3, 4, 4, 4, -9, 5, 5] => -9
- ### Problem 5
- Calculate the actual remainder of a division, given a numerator and denominator, without using the modulo (`%`) operator or equivalent function.
- 25 % 10 = 5
- ### Problem 6
- Return only unique/distinct values from a list of numbers.
- [1, 1, 2, 3, 4, 4, 4, 5, 5] => [1, 2, 3, 4, 5]
- ### Problem 7
- Return the distinct values from a list of numbers as a string, joined with the count of occurrences.
- [1, 1, 2, 3, 4, 4, 4, 5, 5] => '1(2) 2(1) 3(1) 4(3) 5(2)'
- ### Problem 8
- Given a string of expressions (variable assignments and operators) only, and which adheres to the below format, return the results of the expressions.
- 'a=9 b=1 c=5 d=2 e=9 a / -b + c * d % e' => -8
Add Comment
Please, Sign In to add comment