Browsing Category
Algorithm
171 posts
An algorithm is a step-by-step procedure for solving a problem or performing a task. Algorithms can be used in a variety of fields, including computer science, mathematics, and engineering.
Hash Tables Data Structure: Comprehensive Guide with C Implementations
Hash tables are, without exaggeration, one of the data structures I reach for the most in everyday programming.…
Elementary Data Structures: Representing Rooted Trees Explained
When I first started working with trees in code, I realized there isn’t just one “correct” way to…
Elementary Data Structures: Implementing Pointers and Objects in C
Whenever I write data structures in C, I’m reminded that C doesn’t give me objects, references, or garbage…
Elementary Data Structures: Linked Lists Explained with Implementation
Linked lists were one of the very first “real” data structures I learned, right after arrays, and I…
Elementary Data Structures: Stacks and Queues Explained with Implementation
Stacks and queues are two of the simplest data structures I’ve ever worked with, and yet I keep…
Selection in Worst-Case Linear Time: Median of Medians Algorithm Explained
I remember being genuinely surprised the first time I learned that finding the $i$-th smallest element of an…
Selection in Expected Linear Time: Randomized Select Algorithm Explained
Before I understood the deterministic median-of-medians algorithm, I first learned its simpler, faster-in-practice cousin: randomized select, often called…
Medians and Order Statistics: Finding Minimum and Maximum Efficiently
When I study the problem of finding the smallest or largest element in a set of data, I…
Bucket Sort Algorithm: A Linear-Time Distribution Sorting Technique
When I study sorting algorithms, I usually start with comparison-based methods like quicksort or mergesort, which are bound…
Radix Sort Algorithm: A Linear-Time Integer Sorting Technique Explained
I want to start with a simple question I asked myself when I first learned sorting algorithms: is…