Photo from Pixabay

iOS Interview Prep Guide: 30-Day Code Challenge in Swift — Week 1/5

Michael T. Ho
The Startup
Published in
9 min readApr 20, 2020

--

During this stay-at-home period, LeetCode announced earlier that they’re running a 30-day challenge for the month of April. This challenge provides a list of 30 high-frequency interview questions, which is a great opportunity for us to study for future code interviews.

I plan to publish a series of articles to walk you through the challenge questions using Swift. For each question, I will provide an easy-to-understand solution as well as time complexity estimate of it. In addition, as an interviewee and interviewer of iOS technical interviews, I will mention what you could expect in iOS interviews throughout this series.

For those people who want to work on their own, feel free to utilize my Github repo, which includes a solution and unit tests for each coding question. If you have completed the first-week challenge, you can go ahead to the second-week one here.

In this article, we will discuss the following practical programming questions that correspond to the first-week of 30-day code challenge.

  1. Single Number (Solution)
  2. Happy Number (Solution)
  3. Maximum Subarray (Solution) 🥇
  4. Move Zeroes (Solution)
  5. Best Time to Buy and Sell Stock II (Solution)

--

--