Skip to content

dilipkumar2k6/sorting-algorithm

Repository files navigation

Asymptotic notations

Sort array

https://leetcode.com/problems/sort-an-array/description/

Sorting Related problems

https://leetcode.com/problems/two-sum/

https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/

https://leetcode.com/problems/3sum/

https://leetcode.com/problems/4sum/

https://leetcode.com/problems/largest-values-from-labels/

Selection sort

https://leetcode.com/problems/shortest-unsorted-continuous-subarray/

Merge Sort

https://leetcode.com/problems/intersection-of-two-arrays/

https://leetcode.com/problems/intersection-of-two-arrays-ii/

https://leetcode.com/problems/intersection-of-three-sorted-arrays/

https://leetcode.com/problems/merge-sorted-array/

https://leetcode.com/problems/merge-two-sorted-lists/

https://leetcode.com/problems/squares-of-a-sorted-array/

https://leetcode.com/problems/sort-list/

Sort Big File

Imagine you have a 200 GB file with one string per line. Explain how you would sort the file. You cannot bring all the data into memory.

External Merge Sort

https://leetcode.com/problems/merge-k-sorted-lists/

Quick Sort

https://leetcode.com/problems/kth-largest-element-in-an-array/

https://leetcode.com/problems/k-closest-points-to-origin/

https://leetcode.com/problems/top-k-frequent-elements/description/

Dutch Flag Sort

https://leetcode.com/problems/sort-colors/description/

More kth related problems

https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/

https://leetcode.com/problems/find-k-pairs-with-smallest-sums/

https://leetcode.com/problems/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows/

https://leetcode.com/problems/find-k-th-smallest-pair-distance/

https://leetcode.com/problems/kth-smallest-number-in-multiplication-table/

https://leetcode.com/problems/k-th-smallest-prime-fraction/

Heap Sort

https://leetcode.com/problems/kth-largest-element-in-a-stream/

https://leetcode.com/problems/find-median-from-data-stream/

https://leetcode.com/problems/distant-barcodes/

https://leetcode.com/problems/reorganize-string/submissions/

https://leetcode.com/problems/rearrange-string-k-distance-apart/

https://leetcode.com/problems/course-schedule-iii/

Count Sort

https://leetcode.com/problems/sort-colors/description/

https://leetcode.com/problems/height-checker/

https://leetcode.com/problems/two-sum-less-than-k/

Count Sort on negative number

https://www.ripublication.com/ijaer18/ijaerv13n1_28.pdf

Radix sort

Bucket sort

https://leetcode.com/problems/car-pooling/

https://leetcode.com/problems/campus-bikes/

Inversion

https://www.youtube.com/watch?v=owZhw-A0yWE

https://www.hackerrank.com/challenges/ctci-merge-sort/problem

https://leetcode.com/problems/global-and-local-inversions/

Wiggle sort

https://leetcode.com/problems/wiggle-sort

https://leetcode.com/problems/wiggle-sort-ii/

Swap related problems

https://leetcode.com/problems/minimum-swaps-to-group-all-1s-together/

https://leetcode.com/problems/minimum-adjacent-swaps-for-k-consecutive-ones/

Reverse related problems

https://leetcode.com/problems/pancake-sorting/

https://leetcode.com/problems/max-chunks-to-make-sorted/

https://leetcode.com/problems/max-chunks-to-make-sorted-ii/

Sleep sort

https://www.geeksforgeeks.org/sleep-sort-king-laziness-sorting-sleeping/

About

Sorting algo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published