What Data Structure to choose?

Why Trees? 

Consider we need to design an algorithm where there is a constant inflow of many data elements, and whenever there is a query to search a particular element, the retrieval process should be optimal.

In this case, Arrays will not be used as it has a fixed size of data, and hash tables can run into collisions when we pass constantly some data. 

Since the retrieval should be optimal, it eliminates stacks, queues, linked list from this. Time Complexity for searching and retrieving operations for these data structures is O(n). 




Which type of data structure would best be used to implement an excel spreadsheet application with columns and rows that may grow infinitely in size?

<Will be updated>

Comments