🔁 Sorting #5
tpemeja
started this conversation in
Algorithm Checklist
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Patterns
Choose
Details
✅ Built-in sorting
Summary (Key points):
Details
Idioms
Case 1: Array Partition
Case 2: Minimum Absolute Difference
Case 3: H-Index
Pitfalls
✅ Custom comparator sorting
Summary (Key points):
Details
Case 1: Largest Number
Case 2: Reorder Data in Log Files
Case 3: Sort the People
Case 4: Sort Characters By Frequency
✅ Sorting intervals
Summary (Key points):
Details
Case 1: Merge Intervals
Case 2: Non-overlapping Intervals
Case 3: Minimum Number of Arrows to Burst Balloons
Case 4: Remove Covered Intervals
Case 5: Insert Interval
✅ Bucket sort / Counting sort
Summary (Key points):
Details
Case 1: Top K Frequent Elements
Case 2: Relative Sort Array
Case 3: Sort Characters By Frequency
Case 4: Sort Colors
Case 5: Maximum Gap
Case 6: Stable counting sort utility (handles negatives via offset)
All reactions