← All problemsSign in

Chef and String Queries

Chef is fond of strings. He is provided with a string $s$ of length $N$ (initially) consisting of lowercase English alphabets. He has to perform $Q$ queries on it. There are *3 types* of queries: **Type 1:** replace the character at position $x$ with a given character $c$ in the original string. **Type 2:** compare the string in the range $[l_1, r_1]$ ($l_1$ and $r_1$ included) with the string i

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