Font size
Worksheetssuper duper special exam in DSA
Total questions: 121
Worksheet time: 40mins
It use pointer to link nodes.
(a)
Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, get the total number of element present in stack is
1
2
3
4
int is __________ data type.
user defined
derived
primary
all of above
Array is ___________ data type.
user defined
primary
derived
all of above
In (a) data structure, the data items are arranged in a linear sequence.
In (a) data structure data items are not in sequence.
Every stack has a variable (a) associated with it.
A function calls itself is called (a) .
The elements in a queue are added at one end called ________.
front
rear
near
none of above
________is very useful in situation when data have to stored and then retrieved in reverse order.
Stack
Queue
List
Link list
In the __________traversal we process all of a vertex’s descendents before we move to an adjacent vertex.
Depth First
Breadth First
With First
Depth Limited
A graph is a collection of nodes, called __________ And line segments called arcs or__________ that connect pair of nodes.
vertices, edges
edges, vertices
vertices, paths
graph node, edges
A terminal node in a binary tree is called (a)
How many leaf are there in the tree?
(a)
Which of the following data structures can be used for parentheses matching?
n-ary tree
priority queue
stack
queue
The examples of Linear Data Structures are
Stacks,Queues,Linked list
int,float,complex
Operators,tokens,punctuators
Tree, graph
{2, 3, 5, 8, 9, 11};
How would you access the fourth element in nums
A Queue can only store 6 data items. The Queue is sent 4 data items: Bert, Cynthia, Cedric and Albert. Where does the "Front" pointer point?
(a)
A Queue can only store 6 data items. The Queue is sent 4 data items: Bert, Cynthia, Cedric and Albert. Where does the "Rear" pointer point?
(a)
A Queue can only store 6 data items. The Queue is sent 4 data items: Bert, Cynthia, Cedric and Albert. Where does the "Rear" pointer point?
(a)
A Queue can only store 6 data items. The Queue is sent 4 data items: Bert, Cynthia, Cedric and Albert. Where does the "Front" pointer point if a deQueue operation is performed.
(a)
Which data structure cannot have elements of different data types?
(a)
Which of the following is not a valid array?
names=("Tom","Ali","22","Connie")
scores=(2,3,5,4,2,1)
names=("Tom", "Ali", 22, "Connie")
In terms of an array, what is an index?
A value which points to a data element in an array
The first element in an array
A list of all the elements in an array
Which is NOT an operation performed on a queue?
(a)
In a dynamic data structure where is the memory allocated from to hold the data structure?
Heap
Cache
Secondary Storage
ROM
Virtual Memory
A data structure which consists of a collection of elements, typically in fixed number and sequence and typically indexed by names.
Array
Record
Queue
List
Stack
Which of these data structures is LIFO?
Stack
Queue
Binary Tree
Double linked list
Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, what is the number of elements present on the stack
(a)
What method is used to return an element from a stack without removing it?
(a)
If the element "A B C D" are placed in a stack and are deleted one at a time
in what order will they be removed?
(a)
Storage for data defined in terms of set of operations to be performed on the data
Arrays
Variables
Abstract Data Types
Data Types
Stack is also called as
(a)
In stack insertion and deletion can take place only at one end call the (a) of the stack.
The mechanism for passing parameters, return addresses and local variables is referred to as the (a)
A call stack is the mechanism for passing parameters, return addresses and global variables
True
False
In which order are elements pushed onto the stack frame when a call is made?
Parameters
Return Addresses
Local Variables
Return Addresses
Local Variables
Parameters
Local Variables
Return Addresses
Parameters
An ADT gives you specific details on how it will run within a particular algorithm
True
False
Which tree traversal method makes use of a stack?
Depth-First
Breadth-First
The depth-first tree traversal method makes use of a stack
True
False
Which of the following options refers to the mechanism itself for passing parameters, return addresses and local variables?
Stack Frame
Call Stack
Which of the following options refers to the individual collections of pushed parameters, return addresses and local variables for each call?
Stack Frame
Call Stack
A call stack may contain multiple stack frames
True
False
Items are (a) to the stack when a subroutine call is made
Items are (a) from the stack when a subroutine call is completed
A data structure that can grow or shrink in size is referred to as being (a)
A data structure that cannot grow or shrink in size is referred to as being (a)
What are Stacks Used For?
Type in data from keyboard
To remove data
To stack information
To keep track of a sequence of operations
Referring to a stack as FILO is equivalent to saying it is LIFO
True
False
Inorder traversal
Left Right Root
Left Root Right
Right Left Root
Right Left Root
In order traversal of the tree
9 8 4 2 3 5 1
4 9 8 5 2 3 1
8 4 9 1 3 5 2
8 9 4 3 2 5 1
…………………. Is a directed tree in which out degree of each node is less than or equal to two.
Binary tree
AVL tree
Trinary tree
All the above
Which of the following sequences denotes the post order traversal sequence of the tree?
f e g c d b a
g c b d a f e
g c d b f e a
f e d g c b a
The number of edges from the node to the deepest leaf is called (a) of the tree.
It can be used to encapsulate parts of an algorithm by localizing in one section of a program all the statements relevant to a certain aspect of a program.
(a)
1. The number of edges from the node to the deepest leaf is called (a) of the tree.
2. The number of edges from the root to the node is called (a) of the tree.
8. What is the maximum number of children that a binary tree node can have?
(a)
10. A tree is composed of (a) connected by edges or lines.
12. What is the value of the ROOT node in this Tree?
(a)
17. How many leaf are there in the tree?
(a)
31. It is a view or representation of an entity that includes only the most significant attributes
(a)
32. It is a specialized way of storing and organizing data in a computer so that it can be used efficiently.
(a)
33. It is a step by step process to solve a given problem. Take the simplest example below.
(a)
34. It is a method of solving problems that involves breaking a problem down into smaller and smaller sub problems until you get to a small enough problem that it can be solved trivially.
(a)
35. It is the process of arranging a list of elements in a particular order.
(a)
36. Data structures have fixed sizes, structures and memory locations at compile time.
(a)
37. Data structures have sizes, structures and memory locations that can shrink or expand depending on the use.
(a)
38. It is a linear data structure that stores a collection of elements. Operates on first in first out (FIFO) algorithm.
(a)
39. push() and pop() functions are found in..
(a)
40.
Is a sequential collection of elements of the same data type. They are stored sequentially in memory.
(a)
41. Process of inserting an element in stack is called (a)
42. Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the number of elements present in stack are
(a)
43. Which data structure allows deleting data elements from front and inserting from rear?
(a)
44. If the insertion and deletion happens from both the ends then the deletion is called a (a)
45.
If the elements '1', '2', '3' and '4' are added in a stack, so what would be the order for the removal?
(a)
46. Act of adding values into a stack is called
(a)
47. On average, which searching algorithm is more efficient?
(a)
48. A tree is composed of (a) connected by edges or lines.
49.
Which of these tree traversal methods is used to output the contents of a binary tree in ascending order?
(a)
50. Data that a variable can hold in a programming language, all programming language has a set of it.
(a)
51. It use pointer to link nodes.
(a)
52. (a) is a pictorial representation of steps.
53. (a) is an artificial and informal language that helps programmers develop algorithms.
54. What value is at index 1 in this array? String[] names = {"Mack", "Dennis", "Dee", "Charlie"};
(a)
55. Example of linear data structure except
(a)
56. What is the symbol for a decision in a flowchart?
(a)
57. True or false: Data structures are not a crucial part in data management.
(a)
58. At least one of this is produced by an algorithm.
(a)
59.
Each instruction must be very basic, so the purpose of those instructions must be very clear to us.
(a)
