Sorting algorithms have been the subject of massive research in computer science. They all are trying to solve the some problem. Given an array of unsorted values, how can we sort them so that they end up in ascending order? Bubble Sort is a sorting algorithm with the following steps:…
C# Recursion: Simple Concepts, Powerful Results
Recursion is a foundational computer science concept that many concepts are built on top of. Recursion can elegantly solve many algorithms or it can create massive time complexities that ruin your code. But before jumping into the deep end, let’s start simple. Recursion is the term for a function calling…
Queues in C#: Leveraging FIFO for Optimal Performance
A queue is a data structure that is designed to process temporary data. Just like a stack, it processes data but it a different order. Just like a stack, a queue is built from existing data structures; therefore, it is an abstract data type. The best way to think of…
From Theory to Practice: Implementing Stacks in C#
A stack stores data in the same way arrays do. In fact, a stack data structure is actually just an array with limitations. The purposeful “limitations” that we place on stacks are: Push, pop, and peek are operations given to the stack, because it closely resembles a stack of plates….