Quantcast
Channel: Algorithms – agostini.tech
Browsing all 10 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Solving Snakes and Ladders Using Graph Theory

Snakes and Ladders is a popular game that we all played as children. For those of you who are new to the game, it’s a simple game played on a board that consists of 10×10 squares.  The player moves by...

View Article


Image may be NSFW.
Clik here to view.

Implementing Common Sorting Algorithms in Swift

Sorting algorithms are an important feature of modern computing, and in this article we’ll examine some of the most common sorting algorithms in use today. Implementations of these algorithms will be...

View Article


Image may be NSFW.
Clik here to view.

Binary Search Array Extension in Swift

There are more than a few search algorithms. Today we’ll examine one of them, the Binary Search Algorithm, and we’ll implement this algorithm using an array extension in swift. We’ll also compare the...

View Article

Image may be NSFW.
Clik here to view.

Swift Sorting Algorithm

Early this year Dejan wrote an amazing article about sorting algorithms. In this article he was comparing common sorting algorithms with the swift sorting algorithm. What we could observe from his...

View Article

Image may be NSFW.
Clik here to view.

Genetic Algorithms in Swift: Solving TSP

Long long time ago, when I was a student, I wrote a paper on genetic algorithms. This is a really exiting topic for me and I always wanted to create something for iOS using genetic algorithms. This...

View Article


Image may be NSFW.
Clik here to view.

Dijkstra’s Algorithm in Swift

Last week we’ve talked about edge weighted digraphs in swift. This week we’ll talk about a famous algorithm that’s using that data structure. Dijkstra’s algorithm is a simple and well-known algorithm...

View Article

Image may be NSFW.
Clik here to view.

Detecting Directed Cycles In Edge Weighted Digraphs

Edge weighted digraphs can be used for a large number of things. In some cases we want to know if there’s a directed cycle between the nodes (or vertices). For example, if we’re working on a scheduling...

View Article

Image may be NSFW.
Clik here to view.

Bellman-Ford Algorithm in Swift

Bellman-Ford algorithm is a very versatile algorithm for finding the shortest path on an edge weighted directed graph. It differs from Dijkstra’s algorithm in that it can handle the negative cycles on...

View Article


Image may be NSFW.
Clik here to view.

Building the Enigma Machine in Swift

image source: wikipedia.org Enigma Machine was a famous cipher machine that the germans used during the World War 2. In its time it was believed to be uncrackable. Allied forces managed to crack the...

View Article


Image may be NSFW.
Clik here to view.

Big O Notation

Big O notation is a tool we use to estimate how long a program or an algorithm will run. On this blog we’ve covered a lot of algorithms but we only touched on the big O notation. If you have a degree...

View Article
Browsing all 10 articles
Browse latest View live