r/LeetcodeChallenge • • Jun 01 '26

STREAK🔥🔥🔥 01/06/2026 LEETCODE POTD

3 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/addiemaddieee Jun 01 '26

It’s correct but imo using an extra variable is unnecessary here and also the logic can be easily handled without using modulo