← All problemsSign in

Largest Laddu

This Diwali, Chef has decided to treat himself to a laddu feast. Chef's friends brought him some laddus, which he stored in an array $A$. **It is guaranteed that the length of $A$ is a power of $2$**. The $i^{th}$ element of the array $A$ is a laddu of size $A_i$. Chef would like to eat every laddu, but sadly he is on a diet and is allowed to eat only one laddu. He came up with a novel way to reso

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start