ION Group interview question

Just some puzzle basic gfg puzzles