Categories
Computer Science Data Structures

Heaps and Heap Sort

Imagine a queue that doesn’t operate based on who got there first. It rather operates based on the importance of a person in the queue.  For instance, think of a hypothetical passport control. A government official would take the highest priority, followed by a citizen, and then finally a foreigner. In essence, this isn’t a […]

Categories
Computer Science Data Structures

Tries

When you type something on your phone, do you ever wonder how it starts showing autocomplete suggestions? For instance, if you type in ‘ap’ in your phone’s search bar, it might suggest apple, apricot, or any other word that starts with ‘ap’. How do you think this is implemented? Well, if you were to use […]

Categories
Computer Science Data Structures

Linked Lists

Linked lists are the very foundation of a lot of data structures in software development. So, before we  start our discussion of linked lists, let’s try to come back and better understand what an array actually is. An array is a data structure that holds a fixed size of elements in contiguous memory locations. Since […]

Categories
Computer Science Data Structures

Queues

We’ve talked about stacks, so now let’s talk about queues. As a brief recap, a queue is just an order where the first item in an order is the first one to be taken care of.  And as you can probably imagine, they’re the opposite of stacks. Queue Implementation using Lists Let’s jump into a […]

Categories
Computer Science Data Structures

Stacks

Well, let’s get right into it with the topic of stacks in more detail. As a recap, a stack is basically just a collection of items where the last item in the collection is the first one to be removed. Kind of like a book stack where the last book on top is the first […]