Guest User

Untitled

a guest
Oct 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. ### Problem 1
  2. Reverse all characters in a string.
  3.  
  4. 'Only Bob Ate Fresh Gummy Karate Monkeys' => 'syeknoM etaraK ymmuG hserF etA boB ylnO'
  5.  
  6. ### Problem 2
  7. Reverse the order of words in a string.
  8.  
  9. 'Only Bob Ate Fresh Gummy Karate Monkeys' => 'Monkeys Karate Gummy Fresh Ate Bob Only'
  10.  
  11. ### Problem 3
  12. Find the maximum value in a list of numbers.
  13.  
  14. [1, 1, 7, 2, 3, 4, 4, 4, 5, 5] => 7
  15.  
  16. ### Problem 4
  17. Find the minimum value in a list of numbers.
  18.  
  19. [1, 1, 2, 3, 4, 4, 4, -9, 5, 5] => -9
  20.  
  21. ### Problem 5
  22. Calculate the actual remainder of a division, given a numerator and denominator, without using the modulo (`%`) operator or equivalent function.
  23.  
  24. 25 % 10 = 5
  25.  
  26. ### Problem 6
  27. Return only unique/distinct values from a list of numbers.
  28.  
  29. [1, 1, 2, 3, 4, 4, 4, 5, 5] => [1, 2, 3, 4, 5]
  30.  
  31. ### Problem 7
  32. Return the distinct values from a list of numbers as a string, joined with the count of occurrences.
  33.  
  34. [1, 1, 2, 3, 4, 4, 4, 5, 5] => '1(2) 2(1) 3(1) 4(3) 5(2)'
  35.  
  36. ### Problem 8
  37. Given a string of expressions (variable assignments and operators) only, and which adheres to the below format, return the results of the expressions.
  38.  
  39. 'a=9 b=1 c=5 d=2 e=9 a / -b + c * d % e' => -8
Add Comment
Please, Sign In to add comment