India’s Best Job Seekers and Training Platform Forums Data Structure How can you design a data structure that can do…

  • How can you design a data structure that can do…

     Akash  updated 10 months, 2 weeks ago 1 Member · 1 Post
  • Akash 

    Administrator
    at

    How can you design a data structure that can do the following operations in O(1) time:
    Insert, Delete, Search, Max which returns the maximum number
    I know delete, search and insert can be done O(1) time in a hashmap with a proper hash function. But not sure Max is even possible in O(1) with the presence of delete operation?

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
KodNest Training New Batch is starting on 21st September 2020. Attend one week free demo classes.Register Now

New Report

Close