iOS Interview Prep Guide: 30-Day Code Challenge in Swift — Week 2/5
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.
- Middle of the Linked List (Solution)
- Backspace String Compare (Solution)
- Min Stack (Solution) 🥉
- Diameter of Binary Tree (Solution) 🥈
- Last Stone Weight (Solution)
- Contiguous Array (Solution) 🥇
- 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…