Strange operations
Given an array consisting of N integers, you have to do the following operation K times. - Find out the sum of all the elements in the array. Denote it by S. Insert an integer in the array strictly greater than S. Hence, size of the array will increase by one. Thus, at the end of the K operations, the array will have N + K elements. Find out the smallest possible value of the last number inserted
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