Biology Project On Dna Fingerprinting
Biology Project On Dna Fingerprinting
2. What is an Abstract Data Type? What are all not concerned in an ADT? [Nov’10][Apr’15]
An ADT is a set of operation. A useful tool for specifying the logical properties of a datatype is the
abstract data type. ADT refers to the basic mathematical concept that defines the datatype.
Eg. Objects such as list, set and graph along their operations can be viewed as ADT's.
3. What is Last-In First-Out strategy? Which data structure follows this strategy? [Apr’11]
The order in which elements come off a stack gives rise to its alternative name, LIFO (last in, first
out). Considered as a linear data structure, or more abstractly a sequential collection, the push and
pop operations occur only at one end of the structure, referred to as the top of the stack. Stack data
structure follows this strategy.
8. Convert into postfix and evaluate the expression. (a+b*c)/d i.e a=2, b=4, c=6, d=2
Postfix: abc*+d/
Evaluation: 2 4 6 * +2/ =13
Characteristics:
Stack is an ordered list of similar data type.
Stack is a LIFO(Last in First out) structure or we can say FILO(First in Last out).
push() function is used to insert new elements into the stack and pop() function is used to remove
an element from the stack. Both insertion and removal are allowed at only one end of stack called
top.
Stack is said to be in Overflow state when it is completely full and is said to be in Underflow state
if it is completely empty.
Queue Model
Dequeue operation:
1. Check if the queue is empty or not.
2. If the queue is empty, then print underflow error and exit the program.
3. If the queue is not empty, then print the element at the front and increment the front
pointer.
Advantages:
It takes up less memory than the linear queue. So efficient memory utilization.
A new item can be inserted in the location from where a previous item is deleted.
Infinite number of elements can be added continuously but deletion must be used.
Circular Queue:
Another form of linear queue in which the last position is connected to the first position of the list.
The circular queue is similar to linear queue has two ends, the front end and the rear end. The rear
end is where we insert elements and front end is where we delete elements. We can traverse in a
circular queue in only one direction ie) from front to rear.
26. How to avoid frequent overflow conditions and wastage of memory in stack?
The concept of multiple stacks will provide a better solution to avoid frequent overflows and waste
of memory issues in stack.
27. Convert the following infix expression into prefix and postfix expression: (Using stack)
(i) (A - B) * (C+D)
Prefix: * - A B + C D
Postfix: A B – C D + *
(ii) (A + B) / (C + D) - (D * E)
Prefix: - / + A B + C D * D E
Postfix: A B + C D + / D E * -
(iii) (A + B) * C
Prefix: * + A B C
Postfix: A B + C *
(iv) A - (B / C + (D % E * F) / G) * H
Prefix: - * H + / G % * F E D / C B A
Postfix: A B C / D E F * % G / + H * -
32. State the general rule for processing the elements of a priority queue.
The general rules for processing the elements of a priority queue are as,
Rule 1: An element with higher priority is processed before an element with a lower priority.
Rule 2: Two elements with the same priority are processed on First Come First Serve(FCFS) basis.
33. List the types of dequeue and its purpose.
Basically, there are two variants such as,
Input restricted dequeue – Insertion can be done at only one end of the queue while deletions
can be done at both ends.
Output restricted dequeue - Deletion can be done at only one end of the queue while
insertions can be done at both ends.
35. What is static linked list? Give any two applications. [Apr’15]
Static linked lists share following characteristics:
Faster access to elements (when compared with dynamic data structures).
Add, remove or modify elements is not directly possible. If done, it is a resource consuming
process.
Fixed size.
Resources allocated at creation of data structure, even if elements are not contain any value.
Applications:
Stack, Queue implementations
Implementation of graphs, hash tables
Undo functionality in photoshop or word processing.