Graphs & Graph Search Algorithms

A Graph is an important data structure in computer science; it is defined as a collection of nodes with “edges” between some of the nodes. When we talk about Graphs that category includes Trees, however not all Graphs are Trees. “Graphs arise in various real-world situations as there are road networks, computer networks and, most recently,... » read more

What are Protocols? How do We Use Them?

A protocol defines a “blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality”. They can give also give nominal types polymorphic behavior. In Swift, the “protocol can then be adopted by a class, structure [a struct], or enumeration [an enum] to provide an actual implementation of those requirements.... » read more

Stacks & Queues (Data Structures)

In this article, I will briefly explore Stacks and Queues. We will also look at how we can implement these data structures in Swift, and furthermore, we’ll look at the types of applications for which we can use stacks and queues. As an aside, you will often hear stacks referenced in the context of memory... » read more