Intuit | On Campus Intern | Online Assessment Questions
Anonymous User
656

There were 4 questions and time was 90 minutes. Questions were easy.

  1. Given a string and q queries in the form "L R ch" return the occurrences of ch from L to R. The string can be repeated for ex :- string = "aab", query = "1 10 b". Answer would be 3 as string will eventually become "aabaabaaba". Thus the string may be repeated any number of times.
  2. This was just based on sorting on basis of length of strings. We just need to find the first match of length of given string and last match. For ex :- {a, bb, bc, cd, af, ccd, cfghr}, given string = cd. So the first and last occurences are 2 and 5. After this just there was some arithmetic operation to be done.
  3. This was also based on sorting(Greedy).
  4. Convert a Binary Tree into its Mirror Tree.
Comments (1)