Simple but Important algorithms