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

Linear Data Structures (Arrays, Stacks, Queues) question bank (Data Structures & Algorithms)

Practice 6 free GATE & PSUs - Computer Science & Information Technology (CS & IT) Data Structures & Algorithms - Linear Data Structures (Arrays, Stacks, Queues) questions with answers and step-by-step solutions.

Q1.
[Linear Data Structures (Arrays, Stacks, Queues) Concept 2] 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.
[Linear Data Structures (Arrays, Stacks, Queues) Concept 8] 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 5 Questions in Linear Data Structures (Arrays, Stacks, Queues)

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 questions

Unlock every Linear Data Structures (Arrays, Stacks, Queues) question, generate papers, and practice at your own pace.