Data Structure Questions/Concepts – Part 2
1. Where is the concept of data structures applied extensively?
- Compiler Design
- Operating System,
- Database Management System,
- Statistical analysis package,
- Numerical Analysis,
- Artificial Intelligence,
2. Minimum number of queues needed to implement the priority queue?
Two. One queue is used for actual storing of data and another for storing priorities. .
A priority queue is an abstract data type in computer programming.
It is exactly like a regular queue or stack data structure, but additionally, each element is associated with a “priority”. stack: elements are pulled in last-in first-out-order (e.g. a stack of papers)
queue: elements are pulled in first-in first-out-order (e.g. a line in a cafeteria)
priority queue: elements are pulled highest-priority-first (e.g. cutting in line, or VIP service).
It is a common misconception that a priority queue is a heap. A priority queue is an abstract concept like “a list” or “a map”; just as a list can be implemented with a linked list or an array, a priority queue can be implemented with a heap or a variety of other methods.
3. Which is the simplest file structure? (a) Sequential (b) Indexed (c) Random
Sequential is the simplest one.
In computer science, sequential access means that a group of elements (e.g. data in a memory array or a disk file or on magnetic tape data storage) is accessed in a predetermined, ordered sequence. Sequential access is sometimes the only way of accessing the data, for example if it is on a tape. It may also be the access method of choice, for example if we simply want to process a sequence of data elements in order.
4. Different Hashing Functions based on the various methods by which the key value is found?
About this entry
You’re currently reading “Data Structure Questions/Concepts – Part 2,” an entry on Singaram's Tech Musings
- August 6, 2011 / 7:38 PM
- Data Structures And Algorithms