GGK Tech interview question

Some basic programs, puzzles