Floyd’s Cycle detection algorithm or Hair Tortoise algorithm is used to detect if there is a cycle in a linked list. This algorithm is quite confusing if not analyzed mathematically.

If you are aware of the algorithm and want to check only the WHY, jump to the proof section.

What is a Linked List Cycle?

LinkedList cycle

A…


Photo by Piotr Wilk on Unsplash

I

MVVM is the acronym for Model-View-ViewModel. It is an architectural pattern that primarily focuses to provide a clear separation between the core components of your app. MVVM is composed of the following components:

Model:

Model is basically the data model or entities that your application has. They are simply…


While writing SwiftUI views, you might quickly come across an error which says

When does such an error happen?

A view body in SwiftUI goes like

The…


View is one of the foundational blocks of SwiftUI. View in SwiftUI is a pure UI element moving out of the conventional mix of View and Controller in UIKit. In this blog, we will walk through the SwiftUI View and understand about it.

Why is View a struct and not a class anymore?

Why??

One of the fundamental principles of SwiftUI…


Protocols are one of the most important aspects of the Swift programming language. They consist of properties, methods, and other requirements that define the interface of any particular conforming type. Associated types are a great way to enhance the capabilities of protocols making them more generic and flexible.

Let us…


Integrate Apple’s Combine into your view models

It’s been a while since Apple’s own reactive framework Combine came onto the scene. Being a RxSwift user for quite some time, I was more interested in Combine than Swift U, so I decided to learn it first.

I started migrating one of my UIKit + Swift + MVVM projects…


Have you encountered the following in your code:

  • Your components are not that small and cute as they used to be while starting your development.
  • Components in your code produce undesired side effects that are hard to debug.
  • The components you write keep on becoming bulkier if multiple use cases…


Table View and Collection View have been the pillars on which almost all iOS applications have been built. Building these collections is pretty easy and straight forward. The basic flow for populating any Table View or Collection View is:

The data source is generally the list of data that is…


The network layer with respect to a mobile application development could be summed as the combination of all the components that help you create, authenticate and trigger a request and process the response.

In this blog, I will share my experiences in building a network layer from my past projects…


Recently, a friend of mine asked me his queries on Concurrency and Parallelism. When I started explaining him his queries, we started discussing other related concepts and nomenclatures such as Threads -> Multi-threaded and Single, Asynchronous and Synchronous. At a point, we were confused with queries like:

How is concurrency…

G. Abhisek

Software Developer(iOS), Speaker & Writer at Swift India

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store