Below are several programming problems. Try and solve them without Googling the answers.
Create a function(s) that takes an integer and returns its factorial.
Example: Takes 3, returns (1 * 2 * 3) or 6
Bonus points: use recursion
FizzBuzz is a game where players count up, and if the number is divisible by 3 they say 'Fizz' instead of the number. If the number is divisible by '5' they say 'Buzz', and if it is divisible by 3 and 5 they say 'FizzBuzz'.
Example: 1, 2, 'Fizz', 4, 'Buzz', etc.
Create a function(s) that executed the FizzBuzz problem, counting from 1 to 100.
Given a list of integers and a 'sum value' find two values in the list that when added together equal the 'sum value'. The list of integers is already sorted.
List: [1,2,3,9]
Sum: 8
This has no two numbers which when added togher equal 8. (Make sure you have a way of representing an empty return value.)
List: [1,2,4,4]
Sum: 8
Function would return 4 and 4.
Hint: there are several ways of solving this. The more ways you find, the better. Also bonus points if you can explain their Big O value.
Write a function that rearranges an integer into its largest possible value.
superSize 123456 `shouldBe` 654321
superSize 105 `shouldBe` 510
superSize 12 `shouldBe` 21
If the argument passed through is single digit or is already the maximum possible integer, your function should simply return it.