Reverse all characters in a string.
'Bob Ate Fresh Gummy Karate Monkeys' => 'syeknoM etaraK ymmuG hserF etA boB'
Reverse only the order of words in a string.
'Bob Ate Fresh Gummy Karate Monkeys' => 'Monkeys Karate Gummy Fresh Ate Bob'
Find the maximum value in a list of numbers.
[1, 1, 7, 2, 3, 4, 4, 4, 5, 5] => 7
Find the minimum value in a list of numbers.
[1, 1, 2, 3, 4, 4, 4, -9, 5, 5] => -9
Calculate the actual remainder of a division, given a numerator and denominator, without using the modulo (%
) operator or equivalent function.
25 % 10 = 5
Return only unique/distinct values from a list of numbers.
[1, 1, 2, 3, 4, 4, 4, 5, 5] => [1, 2, 3, 4, 5]
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)'
Given a string of expressions (variable assignments and operators) only, and which adheres to the below format, evalute and return the results of the expressions.
'a=9 b=1 c=5 d=2 e=9 a / -b + c * d % e' => -8