Problem 7 Below is a list of data structures and an application. Select two data
ID: 642063 • Letter: P
Question
Problem 7
Below is a list of data structures and an application. Select two data structures that you think would be the most useful for the particular application. Of the two data structures that you selected, pick the better of the two and explain why it is better for that particular application. State all relevant assumptions.
Data Structures:
Simple Array
Single Linked list
Binary Tree
Binary Search Tree
AVL Tree
B-Tree
Large Movie Database: You need a way to find, insert and delete data within a large movie database that will not fit entirely in main memory. Because this doesn
Explanation / Answer
Linked List is Dynamic data Structure .
Linked List can grow and shrink during run time.
Insertion and Deletion Operations are Easier
Efficient Memory Utilization ,i.e no need to pre-allocate memory
Faster Access time,can be expanded in constant time without memory overhead
Linear Data Structures such as Stack,Queue can be easily implemeted using Linked list
Especially in database filesystems linked lists a vital role which is used for searching and retrieving fast
The typical use case for a B+-tree or B-tree is in a database, where there is a huge amount of information and the data are so numerous that they can't all fit into main memory. Accordingly,
the data can then be stored in a B+-tree or B-tree on a hard disk somewhere. This minimizes the number of disk reads necessary to pull in the data during lookups.
Some filesystems (like ext4, I believe) use B-trees as well for the same reason - they minimize the number of disk lookups necessary, which is the real bottleneck