Swiggy iOS Interview Questions

Catherine George
3 min readOct 15, 2021

--

My experience😉!

Hacker Rank Questions🤯

Duration: Total 1 hour 30 mins

Question 1 — Search a node in Binary Tree

Given a Binary Search Tree and a node. The task is to search and check if the given node exists in the binary tree or not. If it exists, print YES otherwise print NO.

Search number 10

Question 2— Minimum number of swaps to segregate Even & Odd numbers

Given an array A[], write a function to count minimum number of swaps to segregate even and odd numbers. The functions should put all even numbers first, and then odd numbers.

A = [13, 10, 21, 20]

After swap, A = [20, 10, 21, 13]

Output = 1

Question 3— Count all distinct pairs with difference equal to K

Given an array A[] and a positive integer K, Write a function to count all distinct pairs with differences equal to K.

A = [1, 5, 3, 4, 2], K= 3

pairs are {1, 4} and {5, 2}

Output: 2

Technical iOS Task👩‍💻

Duration: Total 1 hour 30 mins

Design a simple Movie Listing application with complete flow, proper error handling, refresh, error screen with retry option & crash-free.

Mandatory tasks🧐:

  • Fetch movies using public API
  • Search for movies with the search query
  • Movie detail screen with API

Optional tasks😕:

  • Pagination logic in movie list
  • Sorting logic

Code walkthrough & explanation in detail including the architecture used, networking, functionalities.

Technical iOS Interview Questions🧑‍🏫

Duration: Total 30 mins

  • Private access control
  • Use escaping in closures
  • GCD
  • Closures & closure types
  • Closures are reference type or value type
  • Difference between weak & unowned
  • How do we avoid memory leaks in closures?
  • What will happen if we use unowned properties in both classes?
  • Familiar architectures
  • Enumeration
  • Properties
  • Higher order functions
  • Difference between Class & Struct
  • Value types in Swift
  • Difference between frame & bounds
  • Main Queue
  • Protocols & Extensions
  • Can you add a stored property to a type by using an extension? How or why not?
  • Deeplink & its functionality
  • How to manage navigation to particular screen using deeplink?

Be the Compiler😵‍💫

What will be the output of this code?

Answer: False

What will be the output of this code?

Answer: [1, 2, 3, 4, 5, 6, 7, 8, 9]

Values of self & Self

Answer: self : value, Self : type

Output of print(string)

Answer: String

Good Luck! 🙌

--

--

Catherine George
Catherine George

Written by Catherine George

iOS Developer 👩‍💻| plant-lover🪴| craftswoman 🎁| writing about iOS, swift & interview questions 📝

Responses (2)