Dear Readers, Welcome to Data Structure Objective Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your Job interview for the subject of Data Structure. These objective type Data Structure questions are very important for campus placement test and job interviews. As per my experience good interviewers hardly plan to ask any particular question during your Job interview and these model questions are asked in the online technical test and interview of many IT companies.
A. FILO
B. FIFO
C. LILO
D. Both a and c above
Ans: A
A. Yes
B. No
Ans: A
A. tables arrays
B. matrix arrays
C. both of above
D. none of above
Ans: C
A. Insertion
B. Deletion
C. Updation
D. Retrieval
Ans: D
A. The left subtree of a node contains only nodes with keys less than the node's key
B. The right subtree of a node contains only nodes with keys greater than the node's key.
C. Both a and b above
D. Noth left and right subtree nodes contains only nodes with keys less than the node's key
Ans: C
A. O(n)
B. O(log n)
C. O(2n)
D. O(log 2n)
Ans: B
A. Yes
B. No
Ans: A
A. In red-black trees, the root do not contain data.
B. In red-black trees, the leaf nodes are not relevant and do not contain data.
C. In red-black trees, the leaf nodes are relevant but do not contain data.
D. Both a and c above
Ans: B
A. Root->left sub tree-> right sub tree
B. Root->right sub tree-> left sub tree
C. right sub tree-> left sub tree->Root
D. left sub tree-> right sub tree->Root
Ans: D
A. Root->left sub tree-> right sub tree
B. Root->right sub tree-> left sub tree
C. right sub tree-> left sub tree->Root
D. left sub tree-> root->right sub tree
Ans: D
A. circular doubly linked list
B. circular linked list
C. circular singly linked list
D. doubly linked list
Ans: A
A. random
B. order of priority
C. as and when they come
D. none of the above
Ans: A
A. False
B. True
Ans: B
A. Binary trees
B. Stacks
C. Graphs
D. Both a and c above
Ans: C
A. balanced binary tree
B. rooted complete binary tree
C. complete binary tree
D. degenerate tree
Ans: D
A. Vertices
B. edges
C. both a and b above
D. labels
Ans: B
A. nodes
B. data
C. both a and b above
D. address
Ans: C
A. Hash tables
B. Heaps
C. Both a and b
D. Skip list
Ans: A
A. leaf
B. root
C. first node of left sub tree
D. first node of right sub tree
Ans: B
A. Binary tree
B. Red black tree
C. Splay tree
D. AVL tree
Ans: D
a. Stacks
b. Queues
c. Deques
d. Binary search tree
ans:b
a. Input-restricted deque
b. Output-restricted deque
c. Priority queues
d. None of above
ans:a
a. Strings
b. Lists
c. Stacks
d. None of above
ans:d
a. Strings
b. Lists
c. Queues
d. All of above
ans:d
a. Deque
b. Priority
c. Tree
d. All of above
ans: c
a. Complete binary tree
b. Binary search tree
c. Extended binary tree
d. None of above
ans: c
a. Dn = n log2n
b. Dn = n log2n+1
c. Dn = log2n
d. Dn = log2n+1
ans: d
a. the variable in E will appear as external nodes and operations in internal nodes
b. the operations in E will appear as external nodes and variables in internal nodes
c. the variables and operations in E will appear only in internal nodes
d. the variables and operations in E will appear only in external nodes
ans: a
a. by replacing each empty sub tree by a new internal node
b. by inserting an internal nodes for non-empty node
c. by inserting an external nodes for non-empty node
d. by replacing each empty sub tree by a new external node
ans: d
a. internal nodes on extended tree
b. external nodes on extended tree
c. vanished on extended tree
d. None of above
ans: a
a. ABFCDE
b. ADBFEC
c. ABDECF
d. ABDCEF
ans: c
a. Bubble sort
b. Insertion sort
c. Quick sort
d. All of above
ans:c
a. Sub algorithm
b. Recursion
c. Polish notation
d. Traversal algorithm
ans:b
a. Leaf
b. branch
c. path
d. thread
ans:d
a. Binary trees
b. Binary search trees
c. Heaps
d. None of above
ans:b
a. Values in a node is greater than every value in left sub tree and smaller than right sub tree
b. Values in a node is greater than every value in children of it
c. Both of above conditions applies
d. None of above conditions applies
ans:b
37. In a graph if e=[u, v], Then u and v are called
a. endpoints of e
b. adjacent nodes
c. neighbors
d. all of above
ans:d
a. a tree graph
b. free tree
c. a tree
d. All of above
ans:d
a. u is adjacent to v but v is not adjacent to u
b. e begins at u and ends at v
c. u is processor and v is successor
d. both b and c
ans:d
a. isolated
b. complete
c. finite
d. strongly connected
ans:b
a. Sin gle linked list
b. Lin ear dou bly linked list
c. cir cu lar linked list
d. None of the above
ANS:C
a. S[Top-n]
b. S [Top+n]
c. S [top-n-1]
d. None of the above
ANS:A
a. xxx
b. yyy
c. zzz
d. can not be determined
ANS:A
a. 2
b. 1
c. 0
d. 3
ANS:B
a. 0
b. 5
c. 10
d. 15
ANS:C
a. 2
b. 5
c. 3
d. 0
ANS:C
a. O(n log n)
b. O(2n)
c. O(n2)
d. None of the above
ANS:A
a. First record of the actual data
b. Last record of the actual data
c. Pointer to the last record of the actual data
d. None of the above
ANS:A
a. 3
b. Junk value
c. Run time error
d. Address of the third element
ANS:B
(i) Full m-ary try
(ii) Com plete m-ary tree
(iii)Positional m-ary tree
a. Only (i)
b. Only (ii)
c. Both (i) and (ii)
d. Both (ii) and (III)
ANS:C
a. Processor and memory
b. Complexity and capacity
c. Time and space
d. Data and space
Ans: c
a. Counting microseconds
b. Counting the number of key operations
c. Counting the number of statements
d. Counting the kilobytes of algorithm
Ans:b
a. Counting the maximum memory needed by the algorithm
b. Counting the minimum memory needed by the algorithm
c. Counting the average memory needed by the algorithm
d. Counting the maximum disk space needed by the algorithm
Ans:a
a. Best case
b. Worst case
c. Average case
d. Null case
Ans:d
a. Item is somewhere in the middle of the array
b. Item is not in the array at all
c. Item is the last element in the array
d. Item is the last element in the array or is not there at all
Ans:d
a. When Item is somewhere in the middle of the array
b. When Item is not in the array at all
c. When Item is the last element in the array
d. When Item is the last element in the array or is not there at all
Ans:a
a. Much more complicated to analyze than that of worst case
b. Much more simpler to analyze than that of worst case
c. Sometimes more complicated and some other times simpler than that of worst case
d. None or above
Ans:a
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
Ans:a
a. O(n)
b. O(log )
c. O(n2)
d. O(n log n)
Ans:a
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
Ans:b
a. O(n)
b. O(log n)
c. O(n2)
d. O(n log n)
Ans:c
a. internal change
b. inter-module change
c. side effect
d. side-module update
Ans:d
a. Arrays
b. Linked lists
c. Both of above
d. None of above
Ans:d
a. Trees
b. Graphs
c. Arrays
d. None of above
Ans:c
a. Sorting
b. Merging
c. Inserting
d. Traversal
Ans:d
a. Traversal
b. Search
c. Sort
d. None of above
Ans:b
a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing
c. for both of above situation
d. for none of above situation
Ans:a
a. for relatively permanent collections of data
b. for the size of the structure and the data in the structure are constantly changing
c. for both of above situation
d. for none of above situation
Ans:b
a. the name of array
b. the data type of array
c. the first data from the set to be stored
d. the index set of the array
Ans:c
a. by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated
b. the architecture of computer memory does not allow arrays to store other than serially
c. both of above
d. none of above
Ans: a
A. One
B. Zero
C. -1
D. None of these
Ans: B
A. An Integer
B. a variable
C. a character
D. a Boolean
Ans: A
A. because initialization of data members of the LinkedList class is performed by the constructor of the LinkedList class.
B. because initialization of data members of the LinkedList class is performed by the destructor of the LinkedList class.
C. because initialization of data members of the QueueLinkedList class is performed by the constructor of the LinkedList class.
D. because initialization of data members of the QueueLinkedList class is performed by the destructor of the LinkedList class
Ans: A
A. LIFO,Last In First Out
B. FIFO , First In First Out
C. Both 1 and 2
D. None of these
Ans: B
A. LIFO
B. FIFO
C. Both 1 and 2
D. None of these
Ans: A
A. front
B. back
C. middle
D. Both 1 and 2
Ans: B
A. queue linked list
B. stacks linked list
C. both of them
D. neither of them
Ans: A
A. Node
B. linked list
C. array
D. constructor
Ans: C
A. removeback()
B. isEmpty()
C. removedfront()
D. hasNext()
Ans: B
A. the new node is placed at the front of the linked list.
B. the new node is placed at the back of the linked list.
C. the new node is placed at the middle of the linked list.
D. No Changes happens
Ans: A
A. floor address
B. foundation address
C. first address
D. base address
Ans: D
A. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array
B. LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array
C. LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array
D. None of above
Ans: A
A. linear arrays
B. linked lists
C. both of above
D. none of above
Ans: A
A. The list must be sorted
B. there should be the direct access to the middle element in any sublist
C. There must be mechanism to delete and/or insert elements in list
D. none of above
Ans: C
A. must use a sorted array
B. requirement of sorted array is expensive when a lot of insertion and deletions are needed
C. there must be a mechanism to access middle element directly
D. binary search algorithm is not efficient when the data elements are more than 1000.
Ans: D
A. tables arrays
B. matrix arrays
C. both of above
D. none of above
Ans: C
A. P contains the address of an element in DATA.
B. P points to the address of first element in DATA
C. P can store only memory addresses
D. P contain the DATA and the address of DATA
Ans: A
A. Arrays
B. Records
C. Pointers
D. None
Ans: A
A. Arrays
B. Records
C. Pointers
D. None
Ans: B
A. elementary items
B. atoms
C. scalars
D. all of above
Ans: D