akshateducation.in@gmail.com +91 7597862909
Akshat Education
Akshat Education Learning & Assessment

Data Structures & Algorithms

Practice Questions & Answers

29 Questions
2 / 2 Current Page
Which notation is commonly used to describe an algorithm's asymptotic upper bound? (Algorithm की asymptotic upper bound को describe करने के लिए commonly कौन-सी notation उपयोग होती है?)
Correct Answer
Option A — Big O
Big O notation is commonly used to express an asymptotic upper bound on an algorithm's growth rate. (Big O notation algorithm की growth rate की asymptotic upper bound को express करने के लिए commonly उपयोग की जाती है।)
What is the time complexity of accessing an element of an array by its index? (Array में index के द्वारा किसी element को access करने की time complexity क्या है?)
Correct Answer
Option C — O(1)
Direct index access to an array generally takes constant time. (Array में direct index access generally constant time लेता है।)
What is the worst-case time complexity of linear search? (Linear search की worst-case time complexity क्या है?)
Correct Answer
Option C — O(n)
In the worst case, linear search may need to examine every element. (Worst case में linear search को हर element examine करना पड़ सकता है।)
Binary search requires the data to be: (Binary search के लिए data का होना आवश्यक है:)
Correct Answer
Option B — Sorted
Binary search repeatedly divides a sorted search space into two parts. (Binary search sorted search space को repeatedly दो parts में divide करता है।)
What is the worst-case time complexity of binary search? (Binary search की worst-case time complexity क्या है?)
Correct Answer
Option C — O(log n)
Each comparison approximately halves the remaining search space. (हर comparison remaining search space को लगभग आधा कर देता है।)
Which sorting algorithm repeatedly compares adjacent elements? (कौन-सा sorting algorithm repeatedly adjacent elements को compare करता है?)
Correct Answer
Option B — Bubble sort
Bubble sort repeatedly compares adjacent elements and swaps them when they are in the wrong order. (Bubble sort repeatedly adjacent elements को compare करता है और wrong order में होने पर उन्हें swap करता है।)
What is the typical worst-case time complexity of Bubble Sort? (Bubble Sort की typical worst-case time complexity क्या है?)
Correct Answer
Option D — O(n²)
Bubble sort may require multiple passes through the data, resulting in quadratic worst-case time complexity. (Bubble sort को data पर multiple passes की आवश्यकता हो सकती है, जिसके कारण worst-case time complexity quadratic यानी O[n²] होती है।)
Which sorting algorithm uses the divide-and-conquer technique? (कौन-सा sorting algorithm divide-and-conquer technique का उपयोग करता है?)
Correct Answer
Option A — Merge sort
Merge sort divides the array into smaller parts, sorts them recursively, and merges the sorted parts. (Merge sort array को smaller parts में divide करता है, उन्हें recursively sort करता है और sorted parts को merge करता है।)
What is the average-case time complexity of Quick Sort? (Quick Sort की average-case time complexity क्या है?)
Correct Answer
Option B — O(n log n)
With reasonably balanced partitions, Quick Sort has an average time complexity of O(n log n). (Reasonably balanced partitions होने पर Quick Sort की average time complexity O[n log n] होती है।)
Which data structure is used to represent hierarchical relationships? (Hierarchical relationships को represent करने के लिए कौन-सा data structure उपयोग किया जाता है?)
Correct Answer
Option C — Tree
A tree represents hierarchical relationships using nodes connected by edges. (Tree nodes और edges का उपयोग करके hierarchical relationships को represent करता है।)
In a binary tree, each node can have at most how many children? (Binary tree में प्रत्येक node के अधिकतम कितने children हो सकते हैं?)
Correct Answer
Option B — 2
A binary tree node can have at most two children, commonly called the left and right child. (Binary tree के node के अधिकतम two children हो सकते हैं, जिन्हें commonly left और right child कहा जाता है।)
Which traversal visits the root node between the left and right subtrees? (कौन-सा traversal left और right subtrees के बीच root node को visit करता है?)
Correct Answer
Option B — Inorder
Inorder traversal follows the sequence: Left subtree → Root → Right subtree. (Inorder traversal का sequence होता है: Left subtree → Root → Right subtree.)
Which data structure is primarily used to represent relationships between connected objects? (Connected objects के बीच relationships को represent करने के लिए primarily कौन-सा data structure उपयोग किया जाता है?)
Correct Answer
Option A — Graph
A graph consists of vertices and edges and is used to represent relationships such as networks and connections. (Graph में vertices और edges होते हैं और इसका उपयोग networks तथा connections जैसी relationships को represent करने के लिए किया जाता है।)
What is the main purpose of choosing an appropriate data structure and algorithm? (Appropriate data structure और algorithm choose करने का main purpose क्या है?)
Correct Answer
Option B — To improve the efficiency of solving computational problems (Computational problems को solve करने की efficiency improve करना)
Appropriate data structures and algorithms can improve a program's execution time, memory usage, and overall efficiency. (Appropriate data structures और algorithms program के execution time, memory usage और overall efficiency को improve कर सकते हैं।)