Data Structures and Algorithms - Study24x7
Social learning Network

Warning: include(./views/auth.php): failed to open stream: Permission denied in /var/www/html/live/loginRightSlider.php on line 18

Warning: include(): Failed opening './views/auth.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/live/loginRightSlider.php on line 18
datastructuresalgorithms Cover image
datastructuresalgorithms
Data Structures and Algorithms

  • Warning: Use of undefined constant Followers - assumed 'Followers' (this will throw an Error in a future version of PHP) in /var/www/html/live/makepage.php on line 1760
    Followers
  • Latest Feeds
  • Articles
  • Question
  • Course
  • About
  • Review
Interests
Java Technologies Python Technologies Computer Programming Software Developer
See more

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 31 Oct 2025 12:43 PM study24x7 study24x7

Which traversal technique in trees uses recursion naturally?

A

Inorder

B

Preorder

C

Postorder

D

All of these

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 31 Oct 2025 12:42 PM study24x7 study24x7

Which data structure is used to detect cycles in a graph?

A

Stack

B

Queue

C

Disjoint Set (Union-Find)

D

Heap

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 31 Oct 2025 12:40 PM study24x7 study24x7

In a max heap, the largest element is at:

A

Leaf node

B

Root node

C

Middle node

D

None

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 30 Oct 2025 11:58 AM study24x7 study24x7

Which data structure supports both FIFO and LIFO operations?

A

Deque

B

Stack

C

Array

D

Queue

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 30 Oct 2025 11:57 AM study24x7 study24x7

Which algorithm is based on divide and conquer?

A

Bubble Sort

B

Merge Sort

C

Insertion Sort

D

Selection Sort

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 30 Oct 2025 11:57 AM study24x7 study24x7

Which operation is not possible in an array?

A

Random access

B

Traversal

C

Insertion at arbitrary position

D

Deletion

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 29 Oct 2025 12:22 PM study24x7 study24x7

What is the maximum number of edges in a simple undirected graph with n vertices?

A

B

n(n-1)/2

C

n-1

D

2n

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 29 Oct 2025 12:21 PM study24x7 study24x7

Which data structure is used in BFS (Breadth-First Search)?

A

Stack

B

Queue

C

Tree

D

Heap

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 29 Oct 2025 12:20 PM study24x7 study24x7

Which of these is a stable sorting algorithm?

A

Quick Sort

B

Merge Sort

C

Heap Sort

D

Selection Sort

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 24 Oct 2025 03:01 PM study24x7 study24x7

Which algorithm is used to find the shortest path in a weighted graph?

A

Kruskal’s Algorithm

B

Dijkstra’s Algorithm

C

Prim’s Algorithm

D

Bellman-Ford

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 24 Oct 2025 02:59 PM study24x7 study24x7

What is the average time complexity for searching in a hash table?

A

O(1)

B

O(n)

C

O(log n)

D

O(n log n)

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 24 Oct 2025 11:36 AM study24x7 study24x7

Which data structure allows insertion and deletion from both ends?

A

Stack

B

Queue

C

Deque

D

Priority Queue

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 23 Oct 2025 12:31 PM study24x7 study24x7

In hashing, what is the purpose of a hash function?

A

Encrypt data

B

Convert keys to array index

C

Balance the tree

D

Compress data

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 23 Oct 2025 12:23 PM study24x7 study24x7

Which of these is a non-linear data structure?

A

Stack

B

Queue

C

Array

D

Graph

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 23 Oct 2025 12:18 PM study24x7 study24x7

What is the space complexity of Merge Sort?

A

O(1)

B

O(log n)

C

O(n)

D

O(n log n)

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 22 Oct 2025 11:07 AM study24x7 study24x7

The time complexity of inserting an element at the beginning of a linked list is:

A

O(1)

B

O(n)

C

O(log n)

D

O(n²)

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 22 Oct 2025 11:06 AM study24x7 study24x7

Which traversal gives nodes in sorted order for a Binary Search Tree (BST)?

A

Preorder

B

Postorder

C

Inorder

D

Level order

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 22 Oct 2025 11:06 AM study24x7 study24x7

Which data structure is ideal for implementing priority queues?

A

Stack

B

Heap

C

Linked List

D

Tree

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 21 Oct 2025 12:26 PM study24x7 study24x7

Which data structure is used to implement recursion?

A

Queue

B

Stack

C

Heap

D

Tree

study24x7
Write a comment

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
4 followers study24x7 21 Oct 2025 12:26 PM study24x7 study24x7

What is the worst-case time complexity of Quick Sort?

A

O(n log n)

B

O(n²)

C

O(n)

D

O(log n)

study24x7
Write a comment
Ratings
0.0
out of 5
0 Ratings
5 study24x7
 
0.0
4 study24x7
 
0.0
3 study24x7
 
0.0
2 study24x7
 
0.0
1 study24x7
 
0.0
Related Pages