Sunteți pe pagina 1din 7

……… form of access is used to add and remove

FIFO, First In First Out


nodes from a queue.
In liked representation of stack ……. holds the
INFO fields
elements of the stack.
…….. form of access is used to add remove nodes
LIFO
from a stack.
In the linked representation of the stack ………
Start pointer
behaves as the top pointer variable of stack.
New nodes are added to the ……… of the queue. Back
In linked representation of stack the null pointer of the
Bottom of the stack
last node in the list signals ……….
What happens when you push a new node onto a
The new node is placed at the front of the linked list
stack?
A queue is a ……… FIFO
Which of the following name does not relate to stacks? FIFO lists
The retrieval of items in a stack is ……….. operation. Pop
The term push and pop is related to Stacks
Which is the pointer associated with the stack? TOP
The elements are removal from a stack in ……….
Reverse
order.
The insertion operation in the stack is called ……… Push
…… is the term used to insert an element into stack. push
Stack follows the strategy of …….. LIFO
………. is the term used to delete an element from the
Pop
stack.
Deletion operation is done using ……… in a queue. Front
A pointer variable which contains the location at the top
Top
element of the stack is called …..
Which of the following is an application of stack? All of the above
What is a run list? small batches of records from a file
The situation when in a linked list START=NULL is
Underflow
____________________.
The dummy header in linked list contains
first record of the actual data
____________________.
This indicates the end of the list. Sentinel
LINK is the pointer pointing to the
predecessor node
____________________.
Which is the pointer associated with the availability list? AVAIL
Each node in singly linked list has _______ fields. 2
Value of first linked list index is _______________. 0
Indexing the ________________ element in the list is
Middle
not possible in linked lists.
In a linked list, the ____________ contains the address
Link field
of next element in the list.
Stack follows the strategy of ________________. LIFO
This is the insertion operation in the stack. Push
Which is the pointer associated with the stack? TOP
Deletion operation is done using __________ in a
Front
queue.
What is a queue? FIFO
A pointer variable which contains the location at the top
Top
element of the stack.
Which of the following names does not relate to stacks? FIFO, First In First Out
This form of access is used to add/remove nodes from
LIFO
a stack.
In linked representation of stack, ___________ fields
INFO
hold the elements of the stack.
___________ sorting algorithm is frequently used when
Insertion
n is small, where n is the total number of elements.
The average case occurs in linear search algorithm
when item is somewhere in the middle of the array
_______________.
The worst case occurs in linear search algorithm when Item is the last element in the array or item is not
________________. there at all
The complexity of sorting algorithm measures the
__________ as a function of the number n of items to running time
be shorter.
_____________ order is the best possible for array
O(n+logn)
sorting algorithm which sorts n item.
The method used by card sorter. Radix Sort
The complexity of linear search algorithm. O(n)
State True or False for internal sorting algorithms.
i. Internal sorting are applied when the entire collection
if data to be sorted is small enough that the sorting can
take place within main memory.
True, False
ii. The time required to read or write is considered
significant in evaluating the performance of internal
sorting.

The complexity of merge sort algorithm. O(n logn)


Which of the following is not the required condition for There must be mechanism to delete and/or insert
binary search algorithm? elements in list
The depth of complete binary tree is given by
Dn = log2n+1
________________.
The complexity of linear search algorithm. O(n)
In a graph, if e=[u,v], then u and v are called
All of the choices
_______________
State True or False for internal sorting algorithms.
i. Internal sorting are applied when the entire collection
if data to be sorted is small enough that the sorting can
take place within main memory.
True, False
ii. The time required to read or write is considered
significant in evaluating the performance of internal
sorting.

This is a terminal node in a binary tree. Leaf


A connected graph T without any cycles is called
free graph
________________.
If the number of records to be sorted is small, then
Selection
__________ sorting can be efficient.
TREE[1]=NULL indicates tree is _________ Empty
In a 2-tree, nodes with 0 children are called
external node
___________.
In an extended binary tree, nodes with 2 children are
Internal node
called _________________.
Partition and exchange sort is ____________ quick sort
Which of the following sorting algorithm is of the divide
Merge sort
and conquer type?
Every node N in a binary tree T except the root has a
Predecessor
unique parent called the ________ of N.
These are binary trees with threads. Threaded trees
The rearranging of pairs of elements which are out of
Exchange
order, until no such pairs remain.
Linked representation of binary tree needs ______
3
parallel arrays.
A program to maintain the routes in an airline. Graph
On average, searching in a binary search tree is faster
False
than searching in a list.
The root of a tree is the node that has no ancestors. True
A word processor to have a PF key that causes the
preceding command to be redisplayed. Every time the
Stack
PF key is pressed, the program is to show the
command that preceded the one currently displayed
A binary search cannot be applied to a tree. False
Which of the following data structure is non-linear type? Graph
Draw the binary search tree whose elements are
inserted in the following order:
50 72 96 94 107 26 12 11 9 2 10 25 51 16 17 95
2 9 10 11 12 16 17 25 26 50 51 72 94 95 96 107
If Print is applied to the tree formed above, in which
order would the elements be printed?

Inserting an item into the stack when stack is not full is


called ____________ while operation and deletion of
push, pop
item from the stack, when stack is not empty is called
________________ operation.
Which data structure is suitable to represent the
Tree
hierarchal relationship between elements?
A leaf in a tree is a node with no children. True
Which of the following is two way lists? List traversed in two directions
This refers to a linear collection of data items. List
This form of access is used to add and remove nodes
FIFO, First In First Out
from a queue.
In the linked representation of the stack, __________
Start
pointer behaves as the top pointer variable of stack.
The term push and pop is related to _____________. Stacks
The elements are removal from a stack in _________
Reverse
order.
for the size of the structure and the data in the
Linked lists are best suited _____________________.
structure are constantly changing
A linear list in which the last node points to the first
circular linked list
node.
This is a linear list in which insertions and deletions are
Dequeue
made to form either end of the structure.
A linear list in which the pointer points only to the
singly linked list
successive node.
The retrieval of items in a stack is ___________
pop
operation.
New nodes are added to the ________ of the queue. Back
In linked representation of stack, the null pointer of the
Bottom of the stack
last node in the list signals _____________________.
A connected graph T without any cycles is called a
all of these
____________.
In linked lists, there are no NULL links in
circular linked list
______________
This is a binary tree whose every node has either zero
extended binary tree
or two children.
In a graph, if E=(u,v), it means _____________. e begins at processor u and ends at successor v
This may take place only when there is some minimum
Garbage collection
amount or no space left in free storage list.
Graph G is _____________ if for any pair u, v of nodes
Unliterally connected
in G, there is a path from u to v or path from v to u.
Which indicates pre-order traversal? Root, Left sub-tree, Right sub-tree
Each node in a linked list must contain at least
Two fields
___________________.
The operation of processing each element in the list is
traversal
known as ________________.
Which of the following is non-linear data structure? Trees
A stack and a queue are different names for the same False
Inserting an item into the stack when stack is not full is
called ____________ while operation and deletion of
push, pop
item from the stack, when stack is not empty is called
________________ operation.
Algorithms that use a list must know whether the list is
False
array based or linked.
Which data structure is suitable to represent the
Tree
hierarchal relationship between elements?
A bank simulation of its teller operation to see how
waiting times would be affected by adding another Queue
teller.
A binary tree is a tree in which each node can have
True
zero, one, or two children.
This is very useful in situation when data have to be
stack
stored and then retrieved in reverse order.
A program keeping track of where canned goods are
. Stack
located on a shelf.
level is where the model becomes compatible
Implementation level
executable code.
Binary search trees are ordered. True
Which data structure allows deleting data elements
queues
from and inserting at rear?
Which of the following is/are the levels of
All of these
implementation of data structure?
The value in the right child of a node (if it exists) in a
binary search tree will be greater than the value in the True
node itself.
Identify the data structure which allows deletions at
Input restricted dequeue
both ends of the list but insertion at only one end.
____________________ is not the component of data
None of these
structure.
A _______________ is a data structure that organizes
data similar to a line in the supermarket, where the first Queue linked list
one in line is the first one out.
Herder node is used as sentinel in
Binary tree
__________________.
Which of the following is not the part of ADT
None of these
description?
A stack displays FIFO behavior. False
Which of the following is true about the characteristics
of abstract data types?
i. It exports a type. True, True
ii. It exports a set of operations.

A list may be linear or nonlinear, depending on its


False
implementation.
What is written by the following algorithm?
Push(myStack, 5)
Push(myStack, 4)
Push(myStack, 4)
Pop(myStack, item)
Pop(myStack, item) 45
Push(myStack, item)
WHILE (NOT IsEmpty(myStack))
Pop(myStack, item)
Write item, ' '

Indicate which structure would be a more suitable


choice for each of the following applications.
A program to keep track of patients as they check into a
Queue
medical clinic, assigning patients to doctors on a first-
come, first-served basis.

The root of a tree is the node that has no ancestors. True


A binary search tree is another name for a binary tree. False
It is a pile in which items are added at one end and
Queue
removed from the other.
What is written by the following algorithm? 44
Enqueue(myQueue, 5)
Enqueue(myQueue, 4)
Enqueue(myQueue, 4)
Dequeue(myQueue, item)
Dequeue(myQueue, item)
Enqueue(myQueue, item)
WHILE (NOT IsEmpty(myQueue))
Dequeue(myQueue, item)
Write item, ' '

Set count to 0
WHILE (count < 5)
Set count to count + 1
IF (RanFun())
Write count, ' '
ELSE
Enqueue(myQueue, count) True
WHILE (NOT IsEmpty(myQueue))
Dequeue(myQueue, number)
Write number, ' '
The following output is possible using a queue: 1 3 5 2
4

Which data structure is used in breadth first search of a


Queue
graph to hold nodes?
A program to keep track of family relationships Tree
A program to maintain the routes in an airline. Graph
On average, searching in a binary search tree is faster
False
than searching in a list.
Which of the following data structure can't store the
Arrays
non-homogeneous data elements?
In a graph, the vertices represent the items being
True
modeled.
Stack is also called the ________________. Last in, first out
Set count to 0
WHILE (count < 5)
Set count to count + 1
IF (RanFun())
Write count, ' '
ELSE
Enqueue(myQueue, count) False
WHILE (NOT IsEmpty(myQueue))
Dequeue(myQueue, number)
Write number, ' '
The following output is possible using a queue: 1 3 5 4
2

A dictionary of words used by a spelling checker to be


Binary search tree
built and maintained.
A word processor to have a PF key that causes the
preceding command to be redisplayed. Every time the
Stack
PF key is pressed, the program is to show the
command that preceded the one currently displayed
The value in the left child of a node (if it exists) in a
binary search tree will be greater than the value in the False
node itself.
A program to receive data that is to be saved and
Stack
processed in the reverse order.
A program to keep track of the soccer teams in a city
Tree
tournament
A queue displays LIFO behavior. False
A binary search tree whose left subtree and right
subtree differ in height by at most 1 unit is called AVL tree
____________________.
A leaf in a tree is a node with no children. True
Which of the following data structures is linear type? Stack
Which of the following data structure is non-linear type? Graph
An electronic address book ordered by name Binary Search Tree
Another name for directed graph. Digraph
Binary search algorithm cannot be applied to
Sorted linked list
_______________.
In binary trees, nodes with no successor are called
Terminal Nodes
_______________.
The complexity of bubble sort algorithm. O(n2)
__________________ is putting an element in the
appropriate place in a sorted list yields a larger sorted Insertion
order list.

S-ar putea să vă placă și