File Structure: Representation of data into secondary or auxiliary memory say any device such as hard disk or pen drives that stores data which remains intact until manually deleted is known as a file structure representation.
Storage Structure: In this type, data is stored in the main memory i.e RAM, and is deleted once the function that uses this data gets completely executed.
The difference is that storage structure has data stored in the memory of the computer system, whereas file structure has the data stored in the auxiliary memory.
2. What is a priority queue?
A priority queue is an abstract data type that is like a normal queue but has priority assigned to elements.
Elements with higher priority are processed before the elements with a lower priority.
In order to implement this, a minimum of two queues are required - one for the data and the other to store the priority.
3.What is the maximum number of nodes in a binary tree of height k?
The maximum nodes are : 2k+1-1 where k >= 1
4.What is a Binary Search Tree?
A binary search tree (BST) is a variant of binary tree data structure that stores data in a very efficient manner such that the values of the nodes in the left sub-tree are less than the value of the root node, and the values of the nodes on the right of the root node are correspondingly higher than the root.
Also, individually the left and right sub-trees are their own binary search trees at all instances of time.
5. What are the applications of graph data structure?
Graphs are used in wide varieties of applications. Some of them are as follows:
Social network graphs to determine the flow of information in social networking websites like facebook, linkdin etc.
Neural networks graphs where nodes represent neurons and edge represent the synapses between them
Transport grids where stations are the nodes and routes are the edges of the graph.
Power or water utility graphs where vertices are connection points and edge the wires or pipes connecting them.
Shortest distance between two end points algorithms.
6.What is a heap data structure?
Heap is a special tree-based non-linear data structure in which the tree is a complete binary tree. A binary tree is said to be complete if all levels are completely filled except possibly the last level and the last level has all elements towards as left as possible. Heaps are of two types:
Max-Heap:
In a Max-Heap the data element present at the root node must be greatest among all the data elements present in the tree.
This property should be recursively true for all sub-trees of that binary tree.
Min-Heap:
In a Min-Heap the data element present at the root node must be the smallest (or minimum) among all the data elements present in the tree.
This property should be recursively true for all sub-trees of that binary tree.
7.What is a multidimensional array?
A multidimensional array is a multidimensional array with more than one dimension. It is an array of arrays or an array with numerous layers. The 2D array, or two-dimensional array, is the most basic multidimensional array. As you'll see in the code, it's technically an array of arrays. A 2D array is also referred to as a matrix or a table with rows and columns. Declaring a multidimensional array is the same as saying a one-dimensional array. We need to notify C that we have two dimensions for a two-dimensional array.
8.What is a doubly-linked list? Give some examples.
It is a complex type (double-ended LL) of a linked list in which a node has two links, one that connects to the next node in the sequence and another that connects to the previous node. This allows traversal across the data elements in both directions.
9. Are linked lists considered linear or non-linear Data Structures?
Linked lists are considered both linear and non-linear data structures depending upon the application they are used for. When used for access strategies, it is considered as a linear data-structure. When used for data storage, it is considered a non-linear data structure.
10.What is a stack?
A stack is an abstract data type that specifies a linear data structure, as in a real physical stack or piles where you can only take the top item off the stack in order to remove things. Thus, insertion (push) and deletion (pop) of items take place only at one end called top of the stack, with a particular order: LIFO (Last In First Out) or FILO (First In Last Out).
Post a Comment
0 Comments