Stable sorts | Sorting algorithms

Counting sort

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. Counting sort is not a comparison sort; it uses key values as indexes into an array and the Ω(n log n) lower bound for comparison sorting will not apply. Bucket sort may be used in lieu of counting sort, and entails a similar time analysis. However, compared to counting sort, bucket sort requires linked lists, dynamic arrays, or a large amount of pre-allocated memory to hold the sets of items within each bucket, whereas counting sort stores a single number (the count of items) per bucket. (Wikipedia).

Video thumbnail

Heap Sort - Intro to Algorithms

This video is part of an online course, Intro to Algorithms. Check out the course here: https://www.udacity.com/course/cs215.

From playlist Introduction to Algorithms

Video thumbnail

[c][explained] Selection Sort

Better played at speeds greater than 1.5x. Thanks to a subscriber for noticing the error in the code and letting me know.

From playlist Sorting Algorithms

Video thumbnail

Merge Sort 1 – The Algorithm

This is the first in a series of videos about the merge sort. It describes the principle of the merge sort algorithm, which takes a ‘divide and conquer’ approach to the problem of sorting and unordered list. The videos that follow build on these principles, leading towards a recursive im

From playlist Sorting Algorithms

Video thumbnail

Discrete Math - 3.1.3 Sorting Algorithms

Bubble sort and insertion sort algorithms. Textbook: Rosen, Discrete Mathematics and Its Applications, 7e Playlist: https://www.youtube.com/playlist?list=PLl-gb0E4MII28GykmtuBXNUNoej-vY5Rz

From playlist Discrete Math I (Entire Course)

Video thumbnail

Insertion Sort Algorithm

Visual description of the insertion sort algorithm

From playlist Computer Science

Video thumbnail

Excel 2010: Sorting

In this video, you’ll learn more about sorting data in Excel 2010. Visit https://www.gcflearnfree.org/excel2010/sorting-data/1/ for our text-based lesson. This video includes information on: • Sorting in numerical order • Sorting by date or time • Adding a custom sort • Adding sorting lev

From playlist Microsoft Excel 2010

Video thumbnail

Counting Sort Algorithm Explained | Data Structures And Algorithms Tutorial | Simplilearn

🔥Post Graduate Program In Full Stack Web Development: https://www.simplilearn.com/pgp-full-stack-web-development-certification-training-course?utm_campaign=CountingSort-VLQ9a5u-cyk&utm_medium=DescriptionFF&utm_source=youtube 🔥Caltech Coding Bootcamp (US Only): https://www.simplilearn.com/c

From playlist Data Structures & Algorithms

Video thumbnail

Coding Challenge #40.1: Word Counter in JavaScript

In this Coding Challenge, I build a word counting (concordance) web application in JavaScript. The video demonstrates a use of associate arrays, regular expressions, and other techniques previously covered as part of "Programming from A to Z." 💻Challenge Webpage: https://thecodingtrain.co

From playlist Session 5: Word Counting and Text Analysis - Programming with Text

Video thumbnail

Radix Sort In C | Radix Sort Algorithm Explained | C Language Tutorial For Beginners | Simplilearn

This video is based on Radix Sort In C. The Radix Sort Algorithm Explained in C Tutorial will briefly help beginners with a theoretical explanation of the program's working and implementation of the Radix Sort Algorithm. The C Language Tutorial For Beginners will cover the following topics

From playlist C++ Tutorial Videos

Video thumbnail

How I Feel About Logarithms

also might as well explain all of elementary algebra You can download this video via torrent: magnet:?xt=urn:btih:8E674518C6DF385229E541A3055463998C6B4492&dn=HowIFeelAboutLogarithms_ViHart.mp4&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a

From playlist Doodling in Math and more | Math for fun and glory | Khan Academy

Video thumbnail

Lecture 10a: Bucket Sort, Counting Sort - Richard Buckland

breaking the shannon limit - bucket sort, counting sort. first half of lecture 10 comp1927: data structures and algorithms

From playlist CS2: Data Structures and Algorithms - Richard Buckland

Video thumbnail

Sorting Algorithms Full Course | Sorting Algorithms In Data Structures Explained | Simplilearn

This Simplilearn video is based on The Sorting Algorithms Full Course. This tutorial mainly focuses on all the major Sorting Algorithms In Data Structures Explained with detailed theory and practical examples for providing a better learning experience. This video covers the following Sort

From playlist Simplilearn Live

Video thumbnail

Affine symmetric spaces and 2-torsion in the class group of unit-monogenized cubic... - Artane Siad

Spring Opportunities Workshop 2023 Topic: Affine symmetric spaces and 2-torsion in the class group of unit-monogenized cubic fields Speaker:Artane Siad Affiliation: IAS Date: January 13, 2023 Davenport’s lemma has been a crucial ingredient in recent applications of geometry of numbers

From playlist Spring Opportunities Workshop 2023

Video thumbnail

13.4: Word Counting - Processing Tutorial

This video covers the fundamentals of text analysis with word counting algorithms. Book: Learning Processing A Beginner's Guide to Programming, Images,Animation, and Interaction http://learningprocessing.com/ Twitter: https://twitter.com/shiffman Help us caption & translate this video!

From playlist 13: Text and Data - Processing Tutorial

Video thumbnail

Merge Sort 3 – Towards an Implementation (Merge Two Lists)

This is the third in a series of videos about the merge sort. It includes a description of an algorithm and pseudocode for merging together two ordered lists into a single ordered list. The videos that follow build on these principles, leading towards a recursive implementation of a merg

From playlist Sorting Algorithms

Video thumbnail

Recitation 7: Comparison Sort, Counting and Radix Sort

MIT 6.006 Introduction to Algorithms, Fall 2011 View the complete course: http://ocw.mit.edu/6-006F11 Instructor: Victor Costan License: Creative Commons BY-NC-SA More information at http://ocw.mit.edu/terms More courses at http://ocw.mit.edu

From playlist MIT 6.006 Introduction to Algorithms, Fall 2011

Related pages

Big O notation | Collection (abstract data type) | Prefix sum | Parallel algorithm | Sorting algorithm | Histogram | Comparison sort | Integer | Integer sorting | Radix sort | Dynamic array | Algorithm | Bucket sort | In-place algorithm