March 2024

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
20
2024
0

Daily Question – 1669. Merge In Between Linked Lists

Description: https://leetcode.com/problems/merge-in-between-linked-lists/description/ Notes: Well, the solution for this one is quite straightforward. Defines a method mergeInBetween that replaces...

Mar
18
2024
0

Daily Question – 452. Minimum Number of Arrows to Burst Balloons

My initial approach is to merge the intervals in the points array by calculating their overlapping parts. Each merged interval requires one arrow. Therefore, by counting the number of merged intervals, I can determine the minimum number of arrows needed to burst all balloons.

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.

Mar
11
2024
0

Daily Question – 791. Custom Sort String

I utilized a hashmap to count the number of characters in a specific order. This map stores the characters from the ‘order’ string as keys and their corresponding counts as values. The reason for choosing a LinkedHashMap is to preserve the order in which the characters were inserted.

Mar
10
2024
0

Weekly Contest – 388

This is the first time I have joined the Leetcode contest, the problems are not as difficult as I thought before, and quite straightforward. Maybe is just the rookie luck, I guess. I finished 2 of 4 and finished the third problem later.

Mar
09
2024
0

Daily Question – 25. Reverse Nodes in k-Group

Description: https://leetcode.com/problems/reverse-nodes-in-k-group/description/ Note: Code: