Aug 032017

Let us design a data structure in which we want to store numbers (taking it for simplicity, else it can be anything). We want to minimise the time taken by the following three operations:

  • Insertion, time taken to insert a new value.
  • Deletion, time taken to remove an existing value.
  • Searching, time taken to search for a value in the data structure and see if it is present or not.

Which data structure do you suggest ?

Continue reading »