Everything About ___
Live briefing

Everything about Counting sort

Sorting algorithm

In computer science, counting sort is an algorithm for sorting a collection of objects according to keys that are small positive integers; that is, it is an integer sorting algorithm. It operates by counting the number of objects that possess distinct key values, and applying prefix sum on those counts to determine the positions of each key value in the output sequence. Its running time is linear in the number of items and the difference between the maximum key value and the minimum key value, so it is only suitable for direct use in situations where the variation in keys is not significantly greater than the number of items. It is often used as a subroutine in radix sort, another sorting algorithm, which can handle larger keys more efficiently. Wikipedia →

🧭 Start here: a 6-step reading path

  1. Read the overview: Counting sortA 5-minute orientation
  2. Skim a recent paper: Efficient and Lightweight Automatic Wheat Counting Method with Observation-Centric SORT for Real-Time Unmanned Aerial Vehicle SurveillanceInfluential work since 2022
  3. Pick up a classic book: Favorite foodsThe most-reprinted book on the subject
  4. Read the landmark paper: Real Time Pear Fruit Detection and Counting Using YOLOv4 Models and Deep SORTCited 188 times
  5. Go sideways: Bucket sortA closely related topic
  6. Go sideways: Integer sortingA closely related topic

📖 Definitions

Noun A sorting algorithm that counts how many times each integer key appears in an array and then reorders the array based on those counts.

🏆 Landmark papers (most cited)

🆕 Influential since 2022

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

🔗 Related topics