Software Engineering & Coding - Data Structures & Algorithms (DSA)

Trees & Binary Search Trees question bank (Trees, Graphs & Algorithmic Paradigms)

Practice 5,056 free Software Engineering & Coding - Data Structures & Algorithms (DSA) Trees, Graphs & Algorithmic Paradigms - Trees & Binary Search Trees questions with answers and step-by-step solutions.

Q1.
[Graph Algorithms - Technical Interview #1] Which algorithm is guaranteed to find the shortest path from a single source vertex to all other vertices in a weighted directed graph with non-negative edge weights in O((V + E) log V) time?

(A)
Floyd-Warshall Algorithm using dynamic programming adjacency matrix
(B)
Dijkstra's Algorithm using a binary min-heap / priority queue
(C)
Bellman-Ford Algorithm with relaxation over V-1 iterations
(D)
Kruskal's Algorithm using Union-Find disjoint sets
Show answer & solution
Verified Answer & Solution Locked
Sign in to your free student account to reveal verified answers, instant hints, and detailed explanations.
Sign in to view
Q2.
[Data Structures & Algorithms - Technical Interview #2] What is the worst-case time complexity of QuickSort when the partition element is repeatedly chosen as the minimum or maximum element?

(A)
O(log N)
(B)
O(N log N)
(C)
O(N^2)
(D)
O(N)
Show answer & solution
Verified Answer & Solution Locked
Sign in to your free student account to reveal verified answers, instant hints, and detailed explanations.
Sign in to view
Protected Questions

Unlock All 5056 Questions in Trees & Binary Search Trees

Log in or sign up free to access every question with complete solutions, create chapter practice tests, and track your performance.

Sign up free to access all 5,056 questions

Unlock every Trees & Binary Search Trees question, generate papers, and practice at your own pace.