You wish to create a database of stars. For each star, the database will store several megabytes of data. Considering that your database will store billions of stars, choose the data structure that will provide the best performance. With this data structure you should be able to find, insert, and delete stars. Justify your choice.
The best choice is the self-balancing binary tree, cause all the above operations can realize for log(n) time.
Comments
Leave a comment