adding first problem solution from geeks for geeks