#6 Swift – TDD + Merge Two Lists (LeetCode)

Hi everyone, I am back, and this video is about how we can use Test Driven Development to solve Merge Two Lists algorithm Problem! We can use TDD to solve very small unit of logic, then we can keep refactor our code so that it can works in integration. #tdd #testdrivendevelopment #swiftprogramming #dsa #datastructuresandalgorithms #arifinfrds … Continue reading #6 Swift – TDD + Merge Two Lists (LeetCode)

Get Rid of `nil` Values using Dictionary.compactMapValues { $0 }

What is compactMapValues { $0 } ? compactMapValues {} can be really helps when we are dealing with optional values inside a dictionary. Readability is also important, especially amongs the developers. compactMapValues is one of the great language feature of Swift. "Returns a new dictionary containing only the key-value pairs that have non-nil values as the … Continue reading Get Rid of `nil` Values using Dictionary.compactMapValues { $0 }