> ## Documentation Index
> Fetch the complete documentation index at: https://leetcode-py.wisl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> leetcode-py is a Python LeetCode practice environment generator with one CLI: lcpy. It is not a service or platform.
> Each problem is a directory under leetcode/ with README.md, solution.py, test_solution.py, helpers.py, and playground.ipynb. lcpy gen creates them from JSON templates bundled with the package.
> Examples are backed by tests; copy them verbatim.

# Sorting in Python with Tests

> All 191 Sorting LeetCode problems with tested Python solutions.

Sorting holds 191 problems (37 Easy, 116 Medium, 38 Hard).
Generate any of them into the current directory with `lcpy gen -n <number>`.

<div className="sd-catalog-table">
  | # | Problem | Difficulty | Solution |
  | - | - | - | - |
  | 15 | [3Sum](/problems/three-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/three_sum/solution.py) |
  | 16 | [3Sum Closest](/problems/three-sum-closest) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/three_sum_closest/solution.py) |
  | 18 | [4Sum](/problems/four-sum) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/four_sum/solution.py) |
  | 47 | [Permutations II](/problems/permutations-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/permutations_ii/solution.py) |
  | 49 | [Group Anagrams](/problems/group-anagrams) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/group_anagrams/solution.py) |
  | 56 | [Merge Intervals](/problems/merge-intervals) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_intervals/solution.py) |
  | 75 | [Sort Colors](/problems/sort-colors) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_colors/solution.py) |
  | 88 | [Merge Sorted Array](/problems/merge-sorted-array) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/merge_sorted_array/solution.py) |
  | 147 | [Insertion Sort List](/problems/insertion-sort-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/insertion_sort_list/solution.py) |
  | 148 | [Sort List](/problems/sort-list) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_list/solution.py) |
  | 164 | [Maximum Gap](/problems/maximum-gap) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_gap/solution.py) |
  | 169 | [Majority Element](/problems/majority-element) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/majority_element/solution.py) |
  | 179 | [Largest Number](/problems/largest-number) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_number/solution.py) |
  | 215 | [Kth Largest Element in an Array](/problems/kth-largest-element-in-an-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_largest_element_in_an_array/solution.py) |
  | 217 | [Contains Duplicate](/problems/contains-duplicate) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/contains_duplicate/solution.py) |
  | 218 | [The Skyline Problem](/problems/the-skyline-problem) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_skyline_problem/solution.py) |
  | 220 | [Contains Duplicate III](/problems/contains-duplicate-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/contains_duplicate_iii/solution.py) |
  | 229 | [Majority Element II](/problems/majority-element-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/majority_element_ii/solution.py) |
  | 242 | [Valid Anagram](/problems/valid-anagram) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_anagram/solution.py) |
  | 252 | [Meeting Rooms](/problems/meeting-rooms) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/meeting_rooms/solution.py) |
  | 253 | [Meeting Rooms II](/problems/meeting-rooms-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/meeting_rooms_ii/solution.py) |
  | 259 | [3Sum Smaller](/problems/three-sum-smaller) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/three_sum_smaller/solution.py) |
  | 268 | [Missing Number](/problems/missing-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/missing_number/solution.py) |
  | 274 | [H-Index](/problems/h-index) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/h_index/solution.py) |
  | 280 | [Wiggle Sort](/problems/wiggle-sort) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wiggle_sort/solution.py) |
  | 295 | [Find Median from Data Stream](/problems/find-median-from-data-stream) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_median_from_data_stream/solution.py) |
  | 296 | [Best Meeting Point](/problems/best-meeting-point) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/best_meeting_point/solution.py) |
  | 314 | [Binary Tree Vertical Order Traversal](/problems/binary-tree-vertical-order-traversal) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_tree_vertical_order_traversal/solution.py) |
  | 324 | [Wiggle Sort II](/problems/wiggle-sort-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/wiggle_sort_ii/solution.py) |
  | 332 | [Reconstruct Itinerary](/problems/reconstruct-itinerary) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reconstruct_itinerary/solution.py) |
  | 347 | [Top K Frequent Elements](/problems/top-k-frequent-elements) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/top_k_frequent_elements/solution.py) |
  | 349 | [Intersection of Two Arrays](/problems/intersection-of-two-arrays) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/intersection_of_two_arrays/solution.py) |
  | 350 | [Intersection of Two Arrays II](/problems/intersection-of-two-arrays-ii) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/intersection_of_two_arrays_ii/solution.py) |
  | 354 | [Russian Doll Envelopes](/problems/russian-doll-envelopes) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/russian_doll_envelopes/solution.py) |
  | 358 | [Rearrange String k Distance Apart](/problems/rearrange-string-k-distance-apart) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/rearrange_string_k_distance_apart/solution.py) |
  | 360 | [Sort Transformed Array](/problems/sort-transformed-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_transformed_array/solution.py) |
  | 368 | [Largest Divisible Subset](/problems/largest-divisible-subset) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_divisible_subset/solution.py) |
  | 378 | [Kth Smallest Element in a Sorted Matrix](/problems/kth-smallest-element-in-a-sorted-matrix) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_smallest_element_in_a_sorted_matrix/solution.py) |
  | 389 | [Find the Difference](/problems/find-the-difference) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_difference/solution.py) |
  | 406 | [Queue Reconstruction by Height](/problems/queue-reconstruction-by-height) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/queue_reconstruction_by_height/solution.py) |
  | 414 | [Third Maximum Number](/problems/third-maximum-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/third_maximum_number/solution.py) |
  | 435 | [Non-overlapping Intervals](/problems/non-overlapping-intervals) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/non_overlapping_intervals/solution.py) |
  | 436 | [Find Right Interval](/problems/find-right-interval) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_right_interval/solution.py) |
  | 442 | [Find All Duplicates in an Array](/problems/find-all-duplicates-in-an-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_duplicates_in_an_array/solution.py) |
  | 451 | [Sort Characters By Frequency](/problems/sort-characters-by-frequency) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_characters_by_frequency/solution.py) |
  | 452 | [Minimum Number of Arrows to Burst Balloons](/problems/minimum-number-of-arrows-to-burst-balloons) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_arrows_to_burst_balloons/solution.py) |
  | 455 | [Assign Cookies](/problems/assign-cookies) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/assign_cookies/solution.py) |
  | 462 | [Minimum Moves to Equal Array Elements II](/problems/minimum-moves-to-equal-array-elements-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_moves_to_equal_array_elements_ii/solution.py) |
  | 475 | [Heaters](/problems/heaters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/heaters/solution.py) |
  | 502 | [IPO](/problems/ipo) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/ipo/solution.py) |
  | 506 | [Relative Ranks](/problems/relative-ranks) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/relative_ranks/solution.py) |
  | 522 | [Longest Uncommon Subsequence II](/problems/longest-uncommon-subsequence-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_uncommon_subsequence_ii/solution.py) |
  | 524 | [Longest Word in Dictionary through Deleting](/problems/longest-word-in-dictionary-through-deleting) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_word_in_dictionary_through_deleting/solution.py) |
  | 527 | [Word Abbreviation](/problems/word-abbreviation) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/word_abbreviation/solution.py) |
  | 532 | [K-diff Pairs in an Array](/problems/k-diff-pairs-in-an-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_diff_pairs_in_an_array/solution.py) |
  | 539 | [Minimum Time Difference](/problems/minimum-time-difference) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_time_difference/solution.py) |
  | 561 | [Array Partition](/problems/array-partition) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/array_partition/solution.py) |
  | 581 | [Shortest Unsorted Continuous Subarray](/problems/shortest-unsorted-continuous-subarray) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/shortest_unsorted_continuous_subarray/solution.py) |
  | 594 | [Longest Harmonious Subsequence](/problems/longest-harmonious-subsequence) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_harmonious_subsequence/solution.py) |
  | 611 | [Valid Triangle Number](/problems/valid-triangle-number) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/valid_triangle_number/solution.py) |
  | 621 | [Task Scheduler](/problems/task-scheduler) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/task_scheduler/solution.py) |
  | 628 | [Maximum Product of Three Numbers](/problems/maximum-product-of-three-numbers) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_product_of_three_numbers/solution.py) |
  | 630 | [Course Schedule III](/problems/course-schedule-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/course_schedule_iii/solution.py) |
  | 642 | [Design Search Autocomplete System](/problems/design-search-autocomplete-system) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_search_autocomplete_system/solution.py) |
  | 645 | [Set Mismatch](/problems/set-mismatch) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/set_mismatch/solution.py) |
  | 646 | [Maximum Length of Pair Chain](/problems/maximum-length-of-pair-chain) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_length_of_pair_chain/solution.py) |
  | 658 | [Find K Closest Elements](/problems/find-k-closest-elements) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_k_closest_elements/solution.py) |
  | 692 | [Top K Frequent Words](/problems/top-k-frequent-words) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/top_k_frequent_words/solution.py) |
  | 710 | [Random Pick with Blacklist](/problems/random-pick-with-blacklist) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/random_pick_with_blacklist/solution.py) |
  | 719 | [Find K-th Smallest Pair Distance](/problems/find-k-th-smallest-pair-distance) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_k_th_smallest_pair_distance/solution.py) |
  | 720 | [Longest Word in Dictionary](/problems/longest-word-in-dictionary) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_word_in_dictionary/solution.py) |
  | 721 | [Accounts Merge](/problems/accounts-merge) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/accounts_merge/solution.py) |
  | 726 | [Number of Atoms](/problems/number-of-atoms) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_atoms/solution.py) |
  | 747 | [Largest Number At Least Twice of Others](/problems/largest-number-at-least-twice-of-others) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_number_at_least_twice_of_others/solution.py) |
  | 757 | [Set Intersection Size At Least Two](/problems/set-intersection-size-at-least-two) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/set_intersection_size_at_least_two/solution.py) |
  | 759 | [Employee Free Time](/problems/employee-free-time) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/employee_free_time/solution.py) |
  | 761 | [Special Binary String](/problems/special-binary-string) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/special_binary_string/solution.py) |
  | 767 | [Reorganize String](/problems/reorganize-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reorganize_string/solution.py) |
  | 768 | [Max Chunks To Make Sorted II](/problems/max-chunks-to-make-sorted-ii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/max_chunks_to_make_sorted_ii/solution.py) |
  | 769 | [Max Chunks To Make Sorted](/problems/max-chunks-to-make-sorted) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/max_chunks_to_make_sorted/solution.py) |
  | 786 | [K-th Smallest Prime Fraction](/problems/k-th-smallest-prime-fraction) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_th_smallest_prime_fraction/solution.py) |
  | 791 | [Custom Sort String](/problems/custom-sort-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/custom_sort_string/solution.py) |
  | 792 | [Number of Matching Subsequences](/problems/number-of-matching-subsequences) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_matching_subsequences/solution.py) |
  | 823 | [Binary Trees With Factors](/problems/binary-trees-with-factors) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/binary_trees_with_factors/solution.py) |
  | 825 | [Friends Of Appropriate Ages](/problems/friends-of-appropriate-ages) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/friends_of_appropriate_ages/solution.py) |
  | 826 | [Most Profit Assigning Work](/problems/most-profit-assigning-work) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/most_profit_assigning_work/solution.py) |
  | 833 | [Find And Replace in String](/problems/find-and-replace-in-string) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_and_replace_in_string/solution.py) |
  | 846 | [Hand of Straights](/problems/hand-of-straights) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/hand_of_straights/solution.py) |
  | 853 | [Car Fleet](/problems/car-fleet) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/car_fleet/solution.py) |
  | 857 | [Minimum Cost to Hire K Workers](/problems/minimum-cost-to-hire-k-workers) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_cost_to_hire_k_workers/solution.py) |
  | 869 | [Reordered Power of 2](/problems/reordered-power-of-2) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reordered_power_of_2/solution.py) |
  | 870 | [Advantage Shuffle](/problems/advantage-shuffle) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/advantage_shuffle/solution.py) |
  | 881 | [Boats to Save People](/problems/boats-to-save-people) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/boats_to_save_people/solution.py) |
  | 888 | [Fair Candy Swap](/problems/fair-candy-swap) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/fair_candy_swap/solution.py) |
  | 891 | [Sum of Subsequence Widths](/problems/sum-of-subseq-widths) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sum_of_subseq_widths/solution.py) |
  | 893 | [Groups of Special-Equivalent Strings](/problems/groups-of-special-equivalent-strings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/groups_of_special_equivalent_strings/solution.py) |
  | 899 | [Orderly Queue](/problems/orderly-queue) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/orderly_queue/solution.py) |
  | 905 | [Sort Array By Parity](/problems/sort-array-by-parity) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_array_by_parity/solution.py) |
  | 910 | [Smallest Range II](/problems/smallest-range-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/smallest_range_ii/solution.py) |
  | 912 | [Sort an Array](/problems/sort-an-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_an_array/solution.py) |
  | 922 | [Sort Array By Parity II](/problems/sort-array-by-parity-ii) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_array_by_parity_ii/solution.py) |
  | 923 | [3Sum With Multiplicity](/problems/three-sum-multiplicity) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/three_sum_multiplicity/solution.py) |
  | 937 | [Reorder Data in Log Files](/problems/reorder-log-files) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reorder_log_files/solution.py) |
  | 939 | [Minimum Area Rectangle](/problems/minimum-area-rectangle) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_area_rectangle/solution.py) |
  | 945 | [Minimum Increment to Make Array Unique](/problems/minimum-increment-to-make-array-unique) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_increment_to_make_array_unique/solution.py) |
  | 948 | [Bag of Tokens](/problems/bag-of-tokens) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/bag_of_tokens/solution.py) |
  | 950 | [Reveal Cards In Increasing Order](/problems/reveal-cards-in-increasing-order) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/reveal_cards_in_increasing_order/solution.py) |
  | 954 | [Array of Doubled Pairs](/problems/array-of-doubled-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/array_of_doubled_pairs/solution.py) |
  | 969 | [Pancake Sorting](/problems/pancake-sorting) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/pancake_sorting/solution.py) |
  | 973 | [K Closest Points to Origin](/problems/k-closest-points-to-origin) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/k_closest_points_to_origin/solution.py) |
  | 975 | [Odd Even Jump](/problems/odd-even-jumps) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/odd_even_jumps/solution.py) |
  | 976 | [Largest Perimeter Triangle](/problems/largest-perimeter-triangle) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_perimeter_triangle/solution.py) |
  | 977 | [Squares of a Sorted Array](/problems/squares-of-a-sorted-array) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/squares_of_a_sorted_array/solution.py) |
  | 987 | [Vertical Order Traversal of a Binary Tree](/problems/vertical-order-traversal-of-a-binary-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/vertical_order_traversal_of_a_binary_tree/solution.py) |
  | 1029 | [Two City Scheduling](/problems/two-city-scheduling) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/two_city_scheduling/solution.py) |
  | 1048 | [Longest String Chain](/problems/longest-string-chain) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/longest_string_chain/solution.py) |
  | 1051 | [Height Checker](/problems/height-checker) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/height_checker/solution.py) |
  | 1057 | [Campus Bikes](/problems/campus-bikes) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/campus_bikes/solution.py) |
  | 1058 | [Minimize Rounding Error to Meet Target](/problems/minimize-rounding-error-to-meet-target) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_rounding_error_to_meet_target/solution.py) |
  | 1086 | [High Five](/problems/high-five) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/high_five/solution.py) |
  | 1099 | [Two Sum Less Than K](/problems/two-sum-less-than-k) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/two_sum_less_than_k/solution.py) |
  | 1101 | [The Earliest Moment When Everyone Become Friends](/problems/the-earliest-moment-when-everyone-become-friends) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_earliest_moment_when_everyone_become_friends/solution.py) |
  | 1122 | [Relative Sort Array](/problems/relative-sort-array) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/relative_sort_array/solution.py) |
  | 1133 | [Largest Unique Number](/problems/largest-unique-number) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_unique_number/solution.py) |
  | 1152 | [Analyze User Website Visit Pattern](/problems/analyze-user-website-visit-pattern) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/analyze_user_website_visit_pattern/solution.py) |
  | 1183 | [Maximum Number of Ones](/problems/maximum-number-of-ones) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_ones/solution.py) |
  | 1196 | [How Many Apples Can You Put into the Basket](/problems/how-many-apples-can-you-put-into-the-basket) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/how_many_apples_can_you_put_into_the_basket/solution.py) |
  | 1229 | [Meeting Scheduler](/problems/meeting-scheduler) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/meeting_scheduler/solution.py) |
  | 1235 | [Maximum Profit in Job Scheduling](/problems/maximum-profit-in-job-scheduling) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_profit_in_job_scheduling/solution.py) |
  | 1244 | [Design A Leaderboard](/problems/design-a-leaderboard) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/design_a_leaderboard/solution.py) |
  | 1268 | [Search Suggestions System](/problems/search-suggestions-system) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/search_suggestions_system/solution.py) |
  | 1288 | [Remove Covered Intervals](/problems/remove-covered-intervals) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/remove_covered_intervals/solution.py) |
  | 1383 | [Maximum Performance of a Team](/problems/maximum-performance-of-a-team) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_performance_of_a_team/solution.py) |
  | 1460 | [Make Two Arrays Equal by Reversing Subarrays](/problems/make-two-arrays-equal-by-reversing-subarrays) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/make_two_arrays_equal_by_reversing_subarrays/solution.py) |
  | 1481 | [Least Number of Unique Integers after K Removals](/problems/least-number-of-unique-integers-after-k-removals) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/least_number_of_unique_integers_after_k_removals/solution.py) |
  | 1489 | [Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree](/problems/find-critical-and-pseudo-critical-edges-in-minimum-spanning-tree) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_critical_and_pseudo_critical_edges_in_minimum_spanning_tree/solution.py) |
  | 1498 | [Number of Subsequences That Satisfy the Given Sum Condition](/problems/number-of-subsequences-that-satisfy-the-given-sum-condition) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_subsequences_that_satisfy_the_given_sum_condition/solution.py) |
  | 1508 | [Range Sum of Sorted Subarray Sums](/problems/range-sum-of-sorted-subarray-sums) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/range_sum_of_sorted_subarray_sums/solution.py) |
  | 1509 | [Minimum Difference Between Largest and Smallest Value in Three Moves](/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_difference_between_largest_and_smallest_value_in_three_moves/solution.py) |
  | 1547 | [Minimum Cost to Cut a Stick](/problems/minimum-cost-to-cut-a-stick) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_cost_to_cut_a_stick/solution.py) |
  | 1564 | [Put Boxes Into the Warehouse I](/problems/put-boxes-into-the-warehouse-i) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/put_boxes_into_the_warehouse_i/solution.py) |
  | 1608 | [Special Array With X Elements Greater Than or Equal X](/problems/special-array-with-x-elements-greater-than-or-equal-x) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/special_array_with_x_elements_greater_than_or_equal_x/solution.py) |
  | 1626 | [Best Team With No Conflicts](/problems/best-team-with-no-conflicts) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/best_team_with_no_conflicts/solution.py) |
  | 1636 | [Sort Array by Increasing Frequency](/problems/sort-array-by-increasing-frequency) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_array_by_increasing_frequency/solution.py) |
  | 1637 | [Widest Vertical Area Between Two Points Containing No Points](/problems/widest-vertical-area-between-two-points-containing-no-points) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/widest_vertical_area_between_two_points_containing_no_points/solution.py) |
  | 1647 | [Minimum Deletions to Make Character Frequencies Unique](/problems/minimum-deletions-to-make-character-frequencies-unique) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_deletions_to_make_character_frequencies_unique/solution.py) |
  | 1727 | [Largest Submatrix With Rearrangements](/problems/largest-submatrix-with-rearrangements) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/largest_submatrix_with_rearrangements/solution.py) |
  | 1834 | [Single-Threaded CPU](/problems/single-threaded-cpu) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/single_threaded_cpu/solution.py) |
  | 1838 | [Frequency of the Most Frequent Element](/problems/frequency-of-the-most-frequent-element) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/frequency_of_the_most_frequent_element/solution.py) |
  | 1846 | [Maximum Element After Decreasing and Rearranging](/problems/maximum-element-after-decreasing-and-rearranging) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_element_after_decreasing_and_rearranging/solution.py) |
  | 1851 | [Minimum Interval to Include Each Query](/problems/minimum-interval-to-include-each-query) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_interval_to_include_each_query/solution.py) |
  | 1913 | [Maximum Product Difference Between Two Pairs](/problems/maximum-product-difference-between-two-pairs) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_product_difference_between_two_pairs/solution.py) |
  | 1921 | [Eliminate Maximum Number of Monsters](/problems/eliminate-maximum-number-of-monsters) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/eliminate_maximum_number_of_monsters/solution.py) |
  | 1968 | [Array With Elements Not Equal to Average of Neighbors](/problems/array-with-elements-not-equal-to-average-of-neighbors) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/array_with_elements_not_equal_to_average_of_neighbors/solution.py) |
  | 1984 | [Minimum Difference Between Highest and Lowest of K Scores](/problems/minimum-difference-between-highest-and-lowest-of-k-scores) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_difference_between_highest_and_lowest_of_k_scores/solution.py) |
  | 1985 | [Find the Kth Largest Integer in the Array](/problems/kth-largest-number-in-array) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_largest_number_in_array/solution.py) |
  | 2021 | [Brightest Position on Street](/problems/brightest-position-on-street) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/brightest_position_on_street/solution.py) |
  | 2033 | [Minimum Operations to Make a Uni-Value Grid](/problems/minimum-operations-to-make-a-uni-value-grid) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_operations_to_make_a_uni_value_grid/solution.py) |
  | 2037 | [Minimum Number of Moves to Seat Everyone](/problems/minimum-number-of-moves-to-seat-everyone) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_moves_to_seat_everyone/solution.py) |
  | 2070 | [Most Beautiful Item for Each Query](/problems/most-beautiful-item-for-each-query) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/most_beautiful_item_for_each_query/solution.py) |
  | 2092 | [Find All People With Secret](/problems/find-all-people-with-secret) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_all_people_with_secret/solution.py) |
  | 2191 | [Sort the Jumbled Numbers](/problems/sort-the-jumbled-numbers) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_the_jumbled_numbers/solution.py) |
  | 2251 | [Number of Flowers in Full Bloom](/problems/number-of-flowers-in-full-bloom) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_flowers_in_full_bloom/solution.py) |
  | 2285 | [Maximum Total Importance of Roads](/problems/maximum-total-importance-of-roads) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_total_importance_of_roads/solution.py) |
  | 2300 | [Successful Pairs of Spells and Potions](/problems/successful-pairs-of-spells-and-potions) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/successful_pairs_of_spells_and_potions/solution.py) |
  | 2402 | [Meeting Rooms III](/problems/meeting-rooms-iii) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/meeting_rooms_iii/solution.py) |
  | 2406 | [Divide Intervals Into Minimum Number of Groups](/problems/divide-intervals-into-minimum-number-of-groups) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_intervals_into_minimum_number_of_groups/solution.py) |
  | 2418 | [Sort the People](/problems/sort-the-people) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/sort_the_people/solution.py) |
  | 2421 | [Number of Good Paths](/problems/number-of-good-paths) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/number_of_good_paths/solution.py) |
  | 2491 | [Divide Players Into Teams of Equal Skill](/problems/divide-players-into-teams-of-equal-skill) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_players_into_teams_of_equal_skill/solution.py) |
  | 2503 | [Maximum Number of Points From Grid Queries](/problems/maximum-number-of-points-from-grid-queries) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_number_of_points_from_grid_queries/solution.py) |
  | 2542 | [Maximum Subsequence Score](/problems/maximum-subsequence-score) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_subsequence_score/solution.py) |
  | 2551 | [Put Marbles in Bags](/problems/put-marbles-in-bags) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/put_marbles_in_bags/solution.py) |
  | 2563 | [Count the Number of Fair Pairs](/problems/count-the-number-of-fair-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_the_number_of_fair_pairs/solution.py) |
  | 2583 | [Kth Largest Sum in a Binary Tree](/problems/kth-largest-sum-in-a-binary-tree) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/kth_largest_sum_in_a_binary_tree/solution.py) |
  | 2597 | [The Number of Beautiful Subsets](/problems/the-number-of-beautiful-subsets) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/the_number_of_beautiful_subsets/solution.py) |
  | 2616 | [Minimize the Maximum Difference of Pairs](/problems/minimize-the-maximum-difference-of-pairs) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimize_the_maximum_difference_of_pairs/solution.py) |
  | 2706 | [Buy Two Chocolates](/problems/buy-two-chocolates) | Easy | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/buy_two_chocolates/solution.py) |
  | 2751 | [Robot Collisions](/problems/robot-collisions) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/robot_collisions/solution.py) |
  | 2779 | [Maximum Beauty of an Array After Applying Operation](/problems/maximum-beauty-of-an-array-after-applying-operation) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximum_beauty_of_an_array_after_applying_operation/solution.py) |
  | 2780 | [Minimum Index of a Valid Split](/problems/minimum-index-of-a-valid-split) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_index_of_a_valid_split/solution.py) |
  | 2818 | [Apply Operations to Maximize Score](/problems/apply-operations-to-maximize-score) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/apply_operations_to_maximize_score/solution.py) |
  | 2948 | [Make Lexicographically Smallest Array by Swapping Elements](/problems/make-lexicographically-smallest-array-by-swapping-elements) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/make_lexicographically_smallest_array_by_swapping_elements/solution.py) |
  | 2966 | [Divide Array Into Arrays With Max Difference](/problems/divide-array-into-arrays-with-max-difference) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/divide_array_into_arrays_with_max_difference/solution.py) |
  | 2971 | [Find Polygon With the Largest Perimeter](/problems/find-polygon-with-the-largest-perimeter) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_polygon_with_the_largest_perimeter/solution.py) |
  | 3011 | [Find if Array Can Be Sorted](/problems/find-if-array-can-be-sorted) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_if_array_can_be_sorted/solution.py) |
  | 3016 | [Minimum Number of Pushes to Type Word II](/problems/minimum-number-of-pushes-to-type-word-ii) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/minimum_number_of_pushes_to_type_word_ii/solution.py) |
  | 3068 | [Find the Maximum Sum of Node Values](/problems/find-the-maximum-sum-of-node-values) | Hard | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/find_the_maximum_sum_of_node_values/solution.py) |
  | 3169 | [Count Days Without Meetings](/problems/count-days-without-meetings) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/count_days_without_meetings/solution.py) |
  | 3394 | [Check if Grid can be Cut into Sections](/problems/check-if-grid-can-be-cut-into-sections) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/check_if_grid_can_be_cut_into_sections/solution.py) |
  | 3572 | [Maximize Y-Sum by Picking a Triplet of Distinct X-Values](/problems/maximize-ysum-by-picking-a-triplet-of-distinct-xvalues) | Medium | [solution.py](https://github.com/wislertt/leetcode-py/blob/main/leetcode/maximize_ysum_by_picking_a_triplet_of_distinct_xvalues/solution.py) |
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.