Algorithms: Number of Islands Problem in Swift

Hello guys and girls, Leo here. Today we’ll solve a leetcode problem called “The Number of Islands” using DFS. I know it’s been a while since we don’t solve any algorithm problem so today we’re continuing the algorithm series. Let’s code! Number of Islands Problem – Using DFS to solve Given a 2d grid map of […]

Trie in Swift, the Autocorrect Structure

Hello ladies and gentlemen, Leo here. Today we’ll study a tree-like data structure called Trie in Swift. It’s a special type of tree and its main use in the modern world is the core of autocorrect(autocomplete) algorithms. Will be a great journey into this amazing data structure. At the end of the article, you’ll know exactly what […]

Functional Programming and Shopping Cart Problem in Swift

Hello ladies and gentlemen, Leo here. Today we will explore some Functional Programming in Swift. Functional programming is a programming paradigm that has some really cool ideas. For example, functions are first-class citizens, which means that you can do everything you could do with any other type like Int, you can do with a function like […]

Swift Algorithms: Special Palindrome in Swift

Hey everybody, Leo here. Today we’ll continue the series Algorithms, the Final Frontier. Always remember, this is ONE of many possible solutions to the problem. We will this a special palindrome problem and I hope you all like it. We all know that we need some time to practice algorithms. It doesn’t come for free in […]

Algorithm No Repeats Please in Swift

Hello ladies and gentlemen, Leo here. Today we’ll continue the series Algorithms, the Final Frontier. Always remember, this is ONE of many possible solutions for the problem. The challenge today involves permutation and it algorithm is called No repeats Please a legendary Leetcode challenge. Algorithms are a very important part of our day-to-day job and it […]

Inventory Update Problem in Swift

Hey guys, Leo here. Today we’ll continue the series Algorithms, the Final Frontier. Always remember folks, this is ONE of many possible solutions for the problem. The challenge is here: The Challenge Let’s go! The problem: Compare and update the inventory stored in a 2D array against a second 2D array of a fresh delivery. […]

Algorithms: Find the Symmetric Difference in Swift

Hey guys Leo here, Today we will start a series in this blog called: Algorithms, the Final Frontier. We’ll follow the interview prep series from the free code camp. The first challenge: Challenge Here The problem: Given two sets (for example set A = {1, 2, 3} and set B = {2, 3, 4}), the mathematical […]

How to initialize a 2D array full of zeros in swift?

Just use the array initializer (repeating: , count: ) as follows: var rows = 3 var column = 5 var arrayOfArrayInitialization = [[Int]](repeating: [Int](repeating: 0, count: column), count: rows) That’s all my people, I hope you liked reading this article as much as I enjoyed writing it. If you want to support this blog you can […]

Join our Newsletter!

From beginner-friendly tutorials to advanced coding techniques, the newsletter is designed to help you level up your skills and stay up-to-date with the latest trends in app development.