Contains solution of various problems found on hackerearth, hackerrank and codechef
- BracketProblem
A string with parentheses is well bracketed if all parentheses are matched: every opening bracket has a matching closing bracket and vice versa. Checks if string is well bracketed or not.
- ListRotation
A list rotation consists of taking the last element and moving it to the front. For instance, if we rotate the list [1,2,3,4,5], we get [5,1,2,3,4]. If we rotate it again, we get [4,5,1,2,3]. Rotatelist(l,k) that takes a list l and a positive integer k and returns the list l after k rotations.
- SumofSquares
A positive integer m is a sum of squares if it can be written as k + l where k > 0, l > 0 and both k and l are perfect squares. It takes an integer m returns True if m is a sum of squares and False otherwise.
- RandomPassword
Prints a alphanumeric random password as per input size.