← All problemsSign in

Fun with known problems

String comparison is an age old concept. We have the same simple task for you too, just expected to be performed many-many times. Given an array A containing N strings a0,a2 ... an-1, each of length M, you are expected to handle queries of the type: 0 x y: Output the index of the lexicographically smallest string in A[x...y]. (if there is more smallest ones, pick one with smallest index) 1 x: Pop

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