Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

BMAT STEM Academy

Year 12
Test
Data Structures

Instructions: Answer all questions by selecting the correct answer from the list provided. If
you make a mistake, please draw ONE line through the answer and then select the correct
answer.

Name: ________________________________________
Date: _________________________________________
Room: ________
1. What is a data structure? d) A parentheses balancing
a) A programming language program
b) A collection of algorithms
c) A way to store and organize 6. Which data structure is needed to
data convert infix notation to postfix
d) A type of computer hardware notation?
a) Tree
2. What are the disadvantages of b) Branch
arrays? c) Stack
a) Index value of an array can be d) Queue
negative
b) Elements are sequentially 7. What is the value of the postfix
accessed expression 6 3 2 4 + – *?
c) Data structure like queue or a) 74
stack cannot be implemented b) -18
d) There are chances of wastage of c) 22
memory space if elements inserted d) 40
in an array are lesser than the
allocated size 8. What data structure would you
mostly likely see in non recursive
3. Which data structure is used for implementation of a recursive
implementing recursion? algorithm?
a) Stack a) Stack
b) Queue b) Linked List
c) List c) Tree
d) Array d) Queue

4. The data structure required to


check whether an expression
contains a balanced parenthesis is?
a) Queue
b) Stack
c) Tree 9. Which of the following
d) Array statement(s) about stack data
structure is/are NOT correct?
a) Top of the Stack always contain
5. Which of the following is not the the new node
application of stack? b) Stack is the FIFO data structure
a) Data Transfer between two c) Null link is present in the last
asynchronous process node at the bottom of the stack
b) Compiler Syntax Analyzer d) Linked List are used for
c) Tracking of local variables at implementing Stacks
run time
10. The data structure required for arrays of records
Breadth First Traversal on a graph c) Array in which elements are not
is? present in continuous locations
a) Array d) An array in which most of the
b) Stack elements have the same value
c) Tree
d) Queue 15. Which of the following is not the
type of queue?
11. Which of the following points a) Priority queue
is/are not true about Linked List b) Circular queue
data structure when it is compared c) Single ended queue
with an array? d) Ordinary queue
a) Random access is not allowed
in a typical implementation of
Linked Lists
b) Access of elements in linked list 16. What is the need for a circular
takes less time than compared to queue?
arrays a) easier computations
c) Arrays have better cache b) implement LIFO principle in
locality that can make them better queues
in terms of performance c) effective usage of memory
d) It is easy to insert and delete d) to delete elements based on
elements in Linked List priority

17. What will be the output of the


12. Which data structure is based on following program?
the Last In First Out (LIFO) main()
principle? {
a) Tree char str[]="san foundry";
b) Linked List int len = strlen(str);
c) Stack int i;
d) Queue for(i=0;i<len;i++)
push(str[i]); // pushes an
13. Which of the following application element into stack
makes use of a circular linked list?
a) Recursive function calls for(i=0;i<len;i++)
b) Undo operation in a text editor pop(); //pops an element from
c) Implement Hash Tables the stack
d) Allocating CPU to resources }
a) yrdnuof nas
14. What is a bit array? b) foundry nas
a) Data structure that compactly c) sanfoundry
stores bits d) san foundry
b) Data structure for representing
18. What is the advantage of a hash
table as a data structure?
a) easy to implement
b) faster access of data
c) exhibit good locality of
reference
d) very efficient for less number of
entries

19. What is a dequeue?


a) A queue implemented with both
singly and doubly linked lists
b) A queue with insert/delete
defined for front side of the queue
c) A queue with insert/delete
defined for both front and rear
ends of the queue
d) A queue implemented with a
doubly linked list

20. A data structure in which elements


can be inserted or deleted at/from
both ends but not in the middle is?
a) Priority queue
b) Dequeue
c) Circular queue
d) Queue

You might also like