Articles tagged with Sorting
- Find All People With Secret - UnionFind and Min-Heap solutions, published 2024-02-25
- Minimum Cost to Make Array Equalindromic - Check one palindrome on each side of median, published 2023-12-18
- Largest Submatrix With Rearrangements - Permute histogram bars to maximize area, published 2023-11-26
- Diagonal Traverse II - Short and clean five lines of code using TreeMap, published 2023-11-22
- Movement of Robots - Collision means nothing, published 2023-06-15
- Power of Heroes - One pass solution with detailed explanation, published 2023-05-20
- Checking Existence of Edge Length Limited Paths - Union-Find with sorted edges and queries, published 2023-04-29
- Reduction Operations to Make the Array Elements Equal - Sort and count using hashmap [Short + Easy], published 2023-04-19
- 4Sum - K Sum solution explained, published 2023-02-22
- Put Marbles in Bags - 2 Heap solution with explaination, published 2023-02-17
- Maximum Profit in Job Scheduling - [Explained + Example] DP (Knapsack)+ OOP Faster than 97%, published 2022-11-26
- Wiggle Sort II - Trial and Error, published 2022-10-21
- Top K Frequent Words - [C++,Python(3/1 lines)] Two methods: Sorting / Max heap, published 2022-10-19
- Largest Divisible Subset - DP faster than 95%, published 2022-10-04
- Group Anagrams - Easy hashmap, published 2022-10-04
- 3Sum - Two pointers + Hashmap, published 2022-09-27
- 3Sum Closest - Two pointers in sorted array, published 2022-09-27
- Non-overlapping Intervals - Greedy cpp+python, published 2022-06-17
- Max Number of K-Sum Pairs - Two Sum Approach, published 2022-05-04
- 3Sum With Multiplicity - 3 Sum over keys, published 2022-04-23
- Find Median from Data Stream - Classical solution two heaps, published 2022-03-29
- Top K Frequent Words - 3 line simplest O(n log n ) solution by sorting, published 2022-03-27
- Valid Triangle Number - O(N^2) log(N) Binary Search [AC], published 2022-02-09
- 4Sum - C++ TLE vs Python AC issue, published 2022-02-03