Sort Interview Questions

Sorting-based solutions and comparison strategies.

99 problems

#Title
56Merge Intervals
57Insert Interval
75Sort Colors
88Merge Sorted Array
147Insertion Sort List
148Sort List
164Maximum Gap
179Largest Number
218The Skyline Problem
252Meeting Rooms
253Meeting Rooms II
274H-Index
280Wiggle Sort
324Wiggle Sort II
347Top K Frequent Elements
406Queue Reconstruction by Height
451Sort Characters By Frequency
493Reverse Pairs
692Top K Frequent Words
912Sort an Array
937Reorder Log Files
969Pancake Sorting
973K Closest Points to Origin
976Largest Perimeter Triangle
1054Distant Barcodes
1086High Five
1094Car Pooling
1122Relative Sort Array
1229Meeting Scheduler
1356Sort Integers by The Number of 1 Bits
1365How Many Numbers Are Smaller Than the Current Number
1366Rank Teams by Votes
1451Rearrange Words in a Sentence
1481Least Number of Unique Integers after K Removals
1509Minimum Difference Between Largest and Smallest Value in Three Moves
1523Count Odd Numbers in an Interval Range
1561Maximum Number of Coins You Can Get
1588Sum of All Odd Length Subarrays
1608Special Array With X Elements Greater Than or Equal X
1620Coordinate With Maximum Network Quality
1621Number of Sets of K Non-Overlapping Line Segments
1630Arithmetic Subarrays
1636Sort Array by Increasing Frequency
1637Widest Vertical Area Between Two Points Containing No Points
1680Concatenation of Consecutive Binary Numbers
1685Sum of Absolute Differences in a Sorted Array
1688Count of Matches in Tournament
1703Minimum Adjacent Swaps for K Consecutive Ones
1716Calculate Money in Leetcode Bank
1772Sort Features by Popularity
1847Closest Room
1851Minimum Interval to Include Each Query
1859Sorting the Sentence
1942The Number of the Smallest Unoccupied Chair
1943Describe the Painting
1968Array With Elements Not Equal to Average of Neighbors
1985Find the Kth Largest Integer in the Array
1996The Number of Weak Characters in the Game
2015Average Height of Buildings in Each Segment
2021Brightest Position on Street
2070Most Beautiful Item for Each Query
2089Find Target Indices After Sorting Array
2158Amount of New Area Painted Each Day
2164Sort Even and Odd Indices Independently
2191Sort the Jumbled Numbers
2231Largest Number After Digit Swaps by Parity
2233Maximum Product After K Increments
2248Intersection of Multiple Arrays
2251Number of Flowers in Full Bloom
2343Query Kth Smallest Trimmed Number
2418Sort the People
2497Maximum Star Sum of a Graph
2512Reward Top K Students
2545Sort the Students by Their Kth Score
2659Make Array Empty
2679Sum in a Matrix
2740Find the Value of the Partition
2785Sort Vowels in a String
2792Count Nodes That Are Great Enough
2948Make Lexicographically Smallest Array by Swapping Elements
2974Minimum Number Game
3011Find if Array Can Be Sorted
3025Find the Number of Ways to Place People I
3027Find the Number of Ways to Place People II
3081Replace Question Marks in String to Minimize Its Value
3132Find the Integer Added to Array II
3169Count Days Without Meetings
3194Minimum Average of Smallest and Largest Elements
3309Maximum Possible Number by Binary Concatenation
3394Check if Grid can be Cut into Sections
3431Minimum Unlocked Indices to Sort Nums
3551Minimum Swaps to Sort by Digit Sum
3631Sort Threats by Severity and Exploitability
3644Maximum K to Sort a Permutation
3667Sort Array By Absolute Value
3759Count Elements With at Least K Greater Values
3780Maximum Sum of Three Numbers Divisible by Three
3799Word Squares II
3975Filter Occupied Intervals