Chef and Array
CodeChefOpen on judge ↗
Being a programmer, Chef like arrays lot. On Chef' birthday,Chef friends given him an array "a" consists of n distinct integers. Unfortunately, the size of array "a" is too small. Chef want a bigger array!,Chef friends agree to give him an bigger array. but only if Chef is able to answer the following questions correctly: 1-Largest element in array a 2-Kth largest element Help him for getting
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start