567. Permutation in String | JavaScript | Sliding Window | Two Pointers | LeetCode Daily Challenge

preview_player
Показать описание

I have created a detailed video solution for the leetcode daily challenge.
#javascript #leetcode #leetcodedailychallenge #coding

Connection Info:
Рекомендации по теме
Комментарии
Автор

while setting map, lot of times we have to check if property doesn't exist it has to be 0 . Otherwise we do +1.
so instead of line 9 and 10 . Single line can do this :
map.set(c, (map.get(c) || 0) +1)

ashwanikumar
Автор

Thank you for the video. Can I ask what program you’re using to sketch/draw out the work?

xzxmogw
Автор

❗CORRECTION: Space Complexity: O(1) because the maximum length of the map is 26 which is the length of the English alphabet.

LeetCodeWithMonu