Interview Essentials: Top Swift APIs Worth Memorizing 💭

Alistair Cooper
4 min readMar 24, 2023

Put simply: this is a collection of every Swift API you’d need to solve the Leet Code Blind 75 as well as most common coding challenges. Moreover, these APIs are indispensable in everyday Swift programming!

There can be a slight misconception that coding interviews are purely a test of holistic problem-solving skills, aimed at examining one’s innate abilities. In other words, one may think that memorizing occasionally transitory language features is unnecessary and that presenting solutions just above pseudo code might be sufficient.

The opposite perspective can also be problematic. The anxiety of feeling like it’s necessary to have compiler level knowledge of all error messages, memorize every level of closure syntactic sugar, or syntax around specific frameworks, such as Grand Central Dispatch.

The Balance

A certain foundation of
Foundation (đŸ„đŸ˜† 
😞) is going to be extremely helpful. Essentially these are mini-problems that have already been solved for you in the standard langage. Sometimes easily being able to mentally access one or two of these can go a long way towards a solution.

Numbers

let random = Int.random(in: 0 ..< 100)
let roundedDouble = round(3.5)
let power = pow(3.0, 2.0)
let delta = abs(-1 


--

--

Alistair Cooper

Technical engineering lead at Fender | composer | guitarist | Ironman triathlete | Berklee Alum | Lives in Los Angeles : Made in the U.K.