GGK interview question

pattern ques sorting ques 2 rounds