/
Data Structures and Algorithms Quick Flashcards
Save to my account
Sign up
Data Structures and Algorithms Quick Flashcards
Data Structures and Algorithms Quick Flashcards
Study
1
Question
How are array elements stored in memory?
Page 1
Answer
Contiguously
2
Question
Which of the following is not a linear data structure?
Page 1
Answer
Tree
3
Question
Which notation describes the upper bound of an algorithm?
Page 1
Answer
Big O
4
Question
Which of the following information holds true for an abstract data type?
Page 1
Answer
The ADT implementation is hidden
5
Question
Which traversal of BST prints data in sorted order?
Page 1
Answer
Inorder
6
Question
Inserting sorted elements into a BST results in?
Page 2
Answer
Skewed tree
7
Question
The topmost node of a tree is called?
Page 2
Answer
Root
8
Question
In a singly linked list, each node contains?
Page 2
Answer
Data and pointer to next node
9
Question
The last node in a circular linked list points to?
Page 2
Answer
First node
10
Question
A tree with a maximum of two children is a?
Page 2
Answer
Binary Tree
11
Question
Which is a real-world example of a stack?
Page 3
Answer
Stack of plates
12
Question
What does space complexity measure?
Page 3
Answer
Memory required during execution
13
Question
If an algorithm takes constant time, what is its complexity?
Page 3
Answer
O(1)
14
Question
Which of the following is an example of divide and conquer algorithm?
Page 3
Answer
Binary Search
15
Question
Adding an element to a stack is called?
Page 3
Answer
Push
16
Question
The number of edges from root to node is called?
Page 4
Answer
Depth
17
Question
What is the main disadvantage of arrays?
Page 4
Answer
Fixed size
18
Question
A stack follows which order?
Page 4
Answer
LIFO
19
Question
What is a data structure?
Page 4
Answer
A way of organizing data for efficient use
20
Question
What is the time complexity for accessing an element in an array?
Page 4
Answer
O(1)
21
Question
How is time complexity measured?
Page 5
Answer
By counting the number of primitive operations performed by the algorithm on a given input size.
22
Question
In inorder traversal, nodes are visited in which order?
Page 5
Answer
Left-Root-Right
23
Question
Which of the following best describes an Abstract Data Type (ADT)?
Page 5
Answer
Logical description of operations
24
Question
Which of the following operations has the best time complexity on an array?
Page 5
Answer
Accessing an element by index
25
Question
Removing an element from a queue is called?
Page 5
Answer
Dequeue
26
Question
Which data structure is best suited for implementing recursion?
Page 6
Answer
Stack
27
Question
In a BST, the right subtree contains?
Page 6
Answer
Larger elements
28
Question
A queue follows which order?
Page 6
Answer
FIFO
29
Question
A doubly linked list has?
Page 6
Answer
Two pointers per node
30
Question
A full binary tree has?
Page 6
Answer
Every node with 0 or 2 children