-
iOS, Graph – Shortest Path Algorithms (Dijkstra, Bellman-Ford)
✍️ Note Some codes are sourced from Loony Corn’s Udemy Course (https://www.udemy.com/user/janani-ravi-2/). This post is for personal notes where I summarize the original contents to grasp the key concepts Graph – Shortest Path Algorithms Given a graph G with vertices V and edges E Choose any vertex S – the source…
-
What sorting algorithm does Swift use in iOS?
Sort algorithm in Swift Foundation is TimSort (Insertion Sort + Merge Sort) I wrote posts about Insertion Sort and Merge Sort. You can check How to implement sorting algorithm in Swift You can check the full source code at here https://github.com/apple/swift/blob/main/stdlib/public/core/Sort.swift TimSort Sorts the elements of this buffer according to…
-
iOS, Find least common ancestor from 2 UIViews
Find the least common ancestor. UIView is a tree data structure. Each node (UIView) can have multiple subviews. To find the least common ancestor, You can use either recursive calling or using a superview property. UIView provide a useful functions and properties Let’s create a View Trees. Helper function –…
-
iOS, Implement Least Recently Used Cache
✍️ Note Some codes are sourced from Holczer Balazs’s Udemy Course (https://www.udemy.com/course/algorithms-and-data-structures/learn/lecture/9779302#content). This post is for personal notes where I summarize the original contents to grasp the key concepts Least Recently Used Cache
-
iOS, General Programming Problems
✍️ Note Some codes are sourced from Loony Corn’s Udemy Course (https://www.udemy.com/user/janani-ravi-2/). This post is for personal notes where I summarize the original contents to grasp the key concepts General Programming Problems Often coding interviews involve problems which do not have complicated algorithms or data structures – These are straight programming…
-
iOS, Combine Framework
✍️ Note Some codes and contents are sourced from Apple, WWDC and BigMountStudio. This post is for personal notes where I summarize the original contents to grasp the key concepts (🎨 some images I draw it) Overview The Combine framework provides a declarative approach for how your app processes events. Rather than potentially…
-
iOS, Graph Data Structure
✍️ Note Some codes and contents are sourced from Udemy. This post is for personal notes where I summarize the original contents to grasp the key concepts (🎨 some images I draw it) Graph What is a graph? Undirected Graph Undirected Graph Unconnected Graph Directed Graph Directed Acyclic Graph Graph Representation Graph Interface…
-
iOS, Heap Data Structure
✍️ Note Some codes and contents are sourced from Udemy. This post is for personal notes where I summarize the original contents to grasp the key concepts (🎨 some images I draw it) Priority Queue Binary Heap Shape Property, Height All nodes at Level H-1 nodes (9, 12, 11, 7) have to be…
-
iOS, Autorelease Pool
✍️ Note Some codes and contents are sourced from Apple’s official documentation. This post is for personal notes where I summarize the original contents to grasp the key concepts What is Autorelease Pool? An object that supports Cocoa’s reference-counted memory management system. An autorelease pool stores objects that are sent a release message…
-
iOS, File System
✍️ Note Some codes and contents are sourced from Apple’s official documentation. This post is for personal notes where I summarize the original contents to grasp the key concepts (🎨 some images I draw it) About the iOS File System For security purposes, an iOS app’s interactions with the file system are…