GATE & PSUs - Computer Science & Information Technology (CS & IT)

Sorting & Searching Algorithms question bank (Data Structures & Algorithms)

Practice 6 free GATE & PSUs - Computer Science & Information Technology (CS & IT) Data Structures & Algorithms - Sorting & Searching Algorithms questions with answers and step-by-step solutions.

Q1.
[Sorting & Searching Algorithms Concept 6] What is the worst-case time complexity of building a max-heap of $n$ elements from an arbitrary unsorted array using the bottom-up `Build-Heap` procedure?

(A)
$\Theta(n)$
(B)
$\Theta(n \log n)$
(C)
$\Theta(n^2)$
(D)
$\Theta(\log 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
Q2.
[Sorting & Searching Algorithms Concept 12] What is the worst-case time complexity of building a max-heap of $n$ elements from an arbitrary unsorted array using the bottom-up `Build-Heap` procedure?

(A)
$\Theta(n)$
(B)
$\Theta(n \log n)$
(C)
$\Theta(n^2)$
(D)
$\Theta(\log 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 6 Questions in Sorting & Searching Algorithms

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 6 questions

Unlock every Sorting & Searching Algorithms question, generate papers, and practice at your own pace.