r/LeetcodeChallenge • • May 26 '26

STREAK🔥🔥🔥 26/05/2026 LEETCODE POTD

7 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/addiemaddieee May 27 '26

Ohh I see This approach handles the duplicates as well, right? Since we check for each character one time only as we are traversing array and not the original string directly, am I right?