Professional Documents
Culture Documents
3)What is algorithm?
Algorithm is a step by step procedure, which defines a set of instructions to be
executed in certain order to get the desired output.
1
8)Why do we use queues?
As queues follows FIFO method, they are used when we need to work on data-items
in exact sequence of their arrival. Every operating system maintains queues of various
processes. Priority queues and breadth first traversal of graphs are some examples of
queues.
10)What is hashing?
Hashing is a technique to convert a range of key values into a range of indexes of an
array. By using hash tables, we can create an associative data storage where data index can
be find by providing its key values.
2
16)In what data structures are pointers applied?
Pointers that are used in linked list have various applications in data structure. Data
structures that make use of this concept include the Stack, Queue, Linked List and Binary
Tree.
19)List out the areas in which data structures are applied extensively?
Compiler Design,
Operating System,
Database Management System,
Statistical analysis package,
Numerical Analysis,
Graphics,
Artificial Intelligence,
Simulation
3
23)What are the goals of data structure?
• It must rich enough in structure to reflect the actual relationship of data in real
world.
• The structure should be simple enough for efficient processing of data.
27)What is a graph?
A graph is a pictorial representation of a set of objects where some pairs of objects
are connected by links. The interconnected objects are represented by points termed as
vertices, and the links that connect the vertices are called edges.
28)What is a tree?
A tree is a minimally connected graph having no loops and circuits.
30)What is a Stack?
In data-structure, stack is an Abstract Data Type (ADT) used to store and retrieve
values in Last In First Out method.
4
33)What is binary search tree?
A binary search tree is a binary tree with a special provision where a node's left child
must have value less than its parent's value and node's right child must have value greater
than it's parent value.
• In-order Traversal
• Pre-order Traversal
• Post-order Traversal
▪ Postfix notation (also known as “Reverse Polish notation”): X Y + Operators are written
after their operands. The infix expression given above is equivalent to
A B C + * D/
▪ Prefix notation (also known as “Polish notation”): + X Y Operators are written before
their operands. The expressions given above are equivalent to
5
/*A+BCD
40)Which data structures are used for BFS and DFS of a graph?
▪ Queue is used for BFS
▪ Stack is used for DFS. DFS can also be implemented using recursion (Note that recursion
also uses function call stack).
43)In RDBMS, what is the efficient data structure used in the internal storage
representation?
B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes
searching easier. This corresponds to the records that shall be stored in leaf nodes.
6
44)What are different application of stack.
- calloc() function takes two parameters but malloc() function takes only one parameter.
Binary tree consists of only fixed number of keys and children, whereas B tree
consists of variable number of keys and children. Binary tree keys are stored in decreasing
order, whereas B tree consists of the keys and children in non-decreasing order.
Binary tree doesn't consists of associated child properties whereas B tree consists
of keys has an association with all the nodes with the keys that are less than or equal to the
preceding key. Binary tree doesn't have minimization factor concept, whereas B tree has the
concept of minimization factor where each node has minimum number of allowable
children.
7
49)What's the major distinction in between Storage structure and file structure and how?
The expression of an specific data structure inside memory of a computer system is
termed storage structure in contrast to a storage structure expression in auxiliary memory is
normally known as a file structure.
51)What do you mean by: Syntax Error, Logical Error, Run time Error?
Syntax Error-Syntax Error is due to lack of knowledge in a specific language. It is due to
somebody does not know how to use the features of a language. We can know the errors at
the time of compilation.
logical Error-It is due to the poor understanding of the requirement or problem.
Run time Error-The exceptions like divide a number by 0,overflow and underflow comes
under this.