Suppose we are sorting an array of eight integers...
Guiding State PSC aspirants since 2016 50,000+ students · 1,000+ final selections Exam Calendar Results Call 9116926003
pscnotes
Pick your state
APSC Prelims previous year questions

Suppose we are sorting an array of eight integers using quicksort, and we have just finished the first partitioning with the array looking like 2 5 1 7 9 12 11 10 Which of the following statements is correct?

Asked in APSC 66 12/ Junior Manager (Electrical / Mechanical / IT/ INSTRUMENTATION) , in Assam Power Generation Corporation Limited (APGCL) (Advt. No. 12/, dtd 25-04-) ELECTRICAL ENGINEERING ME 2023

  1. The pivot could be either the 7 or the 9.
  2. The pivot could be the 7, but it is not the 9.
  3. The pivot is not the 7, but it could be the 9.
  4. Neither the 7 nor the 9 is the pivot.
Show answer

Answer: B. The pivot could be the 7, but it is not the 9.

More APSC Prelims previous year questions questions

All 7,314 APSC Prelims previous year questions questions →