Photo from Pixabay

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

Michael T. Ho
The Startup
Published in
11 min readApr 27, 2020

--

The Swift 30-day code challenge is intended for developers who are preparing upcoming iOS interviews or for those who are looking to advance their Swift programming skills. Just FYI, if you haven’t done the first-week code challenges, you can find it here. Also, proceed to Week 3 if you want.

For developers 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.

Let’s get started. In this article, we will discuss another 7 programming questions from the second-week of 30-day code challenge.

  1. Middle of the Linked List (Solution)
  2. Backspace String Compare (Solution)
  3. Min Stack (Solution) 🥉
  4. Diameter of Binary Tree (Solution) 🥈
  5. Last Stone Weight (Solution)
  6. Contiguous Array (Solution) 🥇
  7. Perform String Shifts (Solution)

(🥇 🥈 🥉 indicate writer’s selection of high-frequency interview questions.)

Middle of the Linked List

Description: Given a non-empty, Singly Linked List with head node, return a middle node of the linked list. If there are two middle nodes, return…

--

--