Find Duplicates
CodeChefOpen on judge ↗
You are given a string **s** consisting of lower case alphabets. There are two types of operations which has to be performed for given **Q** queries on string: * **1** **pos** **c** : **replace** $s[pos]$ with character **c**. * **2** **l** **r** : find the number of distinct characters which get repeated in the substring $s[l:r]$. **Example:** in the string **aaabbc**, **a** and
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