Sliding Window

Mar
29
2024
0

Daily Question – 2962. Count Subarrays Where Max Element Appears at Least K Times

Not a hard question, but I need to read the description more carefully.

Mar
28
2024
0

Daily Question – 2958. Length of Longest Subarray With at Most K Frequency

Description: https://leetcode.com/problems/length-of-longest-subarray-with-at-most-k-frequency/description/ Notes: The first solution that came to my mind was brute force: scanning each...

Mar
14
2024
2

Daily Question – 930. Binary Subarrays With Sum

Description: https://leetcode.com/problems/binary-subarrays-with-sum/description/ Notes: My initial approach was a brute force method, which had a time complexity...

Mar
13
2024
0

Daily Question – 30. Substring with Concatenation of All Words

My initial approach is quite straightforward: I use two hashmaps. The first hashmap is used to store the required words, and the second one is used to check whether the word counts in each substring are the same.