SE3| Paypal| Data Structure Round
Anonymous User
1401

I have recently attended the Paypal Round and got the following question:

  1. Design a DataStructure that will support INSERT, DELETE,GETMIN,GETMAX.
    eg: INSERT 1
    INSERT 2
    GETMIN -1
    GETMAX -2
    DELETE 2
    GETMIN -1
    GETMAX -1

  2. Problem 1 : Lets assume you are designing a complicated API ( JSON response with nested sturctures) and It should not return any empty objects/collections etc
    Examples. :

      Response  =.  {{
       student_name = 'Test',
       class='XII',
       subjects=[],
       additonal_info = {     }
      }
    
     Expected =   {
     student_name = 'Test',
       class='XII'
     }
     	   
     
Comments (1)