Array
LeetCode array problems in Golang, grouped by difficulty — with the core pattern called out for each.
Easy 9
- Best Time to Buy and Sell StockGreedy
- Flood FillDFS
- Kth Largest Element in a StreamHeap
- Maximum Average Subarray ISliding window
- Meeting RoomsSorting
- Merge Sorted ArraysTwo pointers
- Remove Duplicates from Sorted ArrayTwo pointers
- Remove ElementTwo pointers
- Two SumHashing
Medium 24
- Best Time to Buy and Sell Stock IIGreedy
- Container With Most WaterTwo pointers
- Find the Smallest Divisor Given a ThresholdBinary search
- Group AnagramsHashing
- Insert IntervalSorting
- Jump GameGreedy
- Jump Game IIGreedy
- Longest Consecutive SequenceHashing
- Longest Increasing SubsequenceDynamic programming
- Longest Substring Without Repeating CharactersSliding window
- Maximum SubarrayDynamic programming
- Meeting Rooms IISorting + heap
- Merge IntervalsSorting
- Minimum Size Subarray SumSliding window
- Next PermutationTwo pointers
- Non-overlapping IntervalsGreedy
- Number of IslandsDFS
- Product of Array Except SelfPrefix products
- Random Pick IndexReservoir sampling
- Remove Duplicates from Sorted Array IITwo pointers
- Remove Stones to Minimize the TotalHeap
- Sort ColorsTwo pointers
- Top K Frequent ElementsHash map + heap
- Valid Triangle NumberTwo pointers
Hard 2
- Making A Large IslandDFS
- Maximum Profit in Job SchedulingDP + binary search
