Swiggy iOS Interview Questions

Ranjit
2 min readJul 24, 2020

The Interview process took 4 rounds

  1. Machine code
  2. Explain the code which you did on Machine code and top of some iOS Questions
  3. iOS [Objective C, Swift and Concepts]
  4. Data structure and Algorithms

Machine code

a) Given a JSON with a list of Variant categories where each category has a single choice list of variants. Create a UI to display this so that the user selects one variant from each group. Display Name, Price and inStock for each variant.

Ex:

Crust

* Thin

* Thick

* Cheese burst

Size

* Small

* Medium

* Large

b) Extend the above code to handle exclusion list, i.e list of variant combinations that user can’t select.

Ex:

* Crust: Cheese burst, Size: Small

* Crust: Thick, Size: Large

iOS [Objective C, Swift and Concepts]

1)Explain to me about MVVM architecture and what it takes away from MVC

2)What is the difference between GCD and NSOperarionQueue

3)How many ways can we create Thread?

4)What is the difference in creating the thread using GCD and using NSThread?

5)What is the difference between NSOperarion and OperationQueue and what NSOperarionQueue takes away from NSOperarion and why we are subclassing it usually?

6)Have you used Multithreaded programming in iOS? Yeah, I said I have used two difference Managed Object Context. Then explain to me how you have done and write a code for this? Then, what is the difference between PerformLockAndWait and performAndWait?

10)What is Protocol oriented programming and what problem Apple is trying to solve in Object-oriented programming using POP

11)Value semantics like there is a var array and it has a list of class objects and you are passing this to function and there when you try to append some value is it possible? And what if you are changing some property value of the first object will it be possible?

12)Explain to me about NSBlockOperation and adding a dependency?

13)What is Swizzling and do you know how it works?

14)What is dynamic dispatch?

15)What is a hash table and why do we need to add @objc in the selector function?

16)What is triple Equal operator and what is the use case here?

17)If Array is Struct then how Append/Remove object works? How immutable struct is handling these operations

Data structure and Algorithms

1) There is a two Singly Linked List array but one of number from two list is reaching somewhere, then How do you define the algorithm?

2) In the Linked list there is some unsorted Array and wants to find one value, how will you find? Can uou write an algorithm for this? If you come up with something they are asking what is the time complexity on this and is there any way we can optimize in this?

3)And They have asked how good are you at Binary Search Tree and Tree related problems?

--

--