Open In App

Paytm Interview Experience | Set 15

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report
  • Round I
    1. Say millions of players are playing a game online and their scores keep changing. Every player is represented by ID and SCORE. How to implement the following queries
      • (i) a new player can be added, input will be id and score
      • (ii) An existing player’s score can be updated as the game is being played online in real time, input will be id and score
      • (iii) any time a player can get its rank, input will be id, return rank
      • (iv) any time you should give top k players, where k is not fixed, the input is k, return a list of top k players with id and scores

      I tried to solve it with a lot of data structures but a balanced binary search tree appeared me best at that time for all queries. He also asked to handle cases where scores of players are same. There can be two cases: scores of the same players have the same rank and scores of the same players have a different rank on the basis of id.

    2. Find Excel column name from a given column number
  • Round II
    1. Recursively remove all adjacent duplicates

      This question has ambiguous outputs.
      consider input : 1 2 4 5 5 4 4 5 7 8
      if you remove first two occurrence of 5 first then output will be 1 2 5 7 8
      if you remove first two occurrences of 4 first then output will be 1 2 4 7 8

      Interviewer only stated the problem did not asked to use recursion or something so I solved it using stack without recursion but took lot of time.

    2. Ugly Numbers
  • Round III
    1. Java Concepts Questions, required proper explanation
    2. Count all possible paths from top left to bottom right
       


Last Updated : 29 May, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads