Kotak Mahindra Interview Experience (SDE2)

kotak mahindra bank logo
kotak mahindra bank
SDE II
October 17, 202543 reads

Summary

I recently interviewed with Kotak Mahindra for an SDE 2 role, which spanned three rounds covering Data Structures & Algorithms, general distributed systems concepts, and a Low-Level Design problem.

Full Experience

My interview journey with Kotak Mahindra for an SDE 2 position was structured across three distinct rounds.

The first round, a Barraiser round, tested my foundational knowledge. I was presented with standard DSA problems like Two Sum, Search in Rotated Sorted Array, and Set Matrix Zeroes. Beyond coding, we also delved into general concepts related to distributed systems, which required a broader understanding of architectural principles.

The second round was purely focused on Data Structures and Algorithms. This round was quite challenging, featuring problems such as First Missing Positive, which I found particularly tough to solve, Burst Balloons, and Longest Increasing Path in a Matrix. This round truly pushed my problem-solving abilities.

Finally, the third round was a Low-Level Design (LLD) challenge. I was tasked with designing a Hospital Management System. The key requirements included patient registration with priority assignment, a priority queue for patients, an initial consultation process by a doctor, subsequent assignment to specialist doctors, and maintaining comprehensive treatment records. This round assessed my ability to translate abstract requirements into a robust system design.

Interview Questions (7)

Q1
Two Sum
Data Structures & AlgorithmsEasy

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.

Q2
Search in Rotated Sorted Array
Data Structures & AlgorithmsMedium

There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly rotated at an unknown pivot index k (1 <= k < nums.length) such that the resulting array is [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]] (0-indexed). For example, [0,1,2,4,5,6,7] might be rotated at pivot index 3 and become [4,5,6,7,0,1,2]. Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums.

Q3
Set Matrix Zeroes
Data Structures & AlgorithmsMedium

Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's. Do it in-place.

Q4
First Missing Positive
Data Structures & AlgorithmsHard

Given an unsorted integer array nums, return the smallest missing positive integer. You must implement an algorithm that runs in O(n) time and uses O(1) auxiliary space.

Q5
Burst Balloons
Data Structures & AlgorithmsHard

You are given n balloons, indexed from 0 to n - 1. Each balloon is painted with a number on it represented by nums[i]. You are asked to burst all the balloons. If you burst the i-th balloon, you will get nums[left] * nums[i] * nums[right] coins. left and right are adjacent indices of i. After the burst, the left and right then become adjacent. Find the maximum coins you can collect by bursting the balloons wisely.

Q6
Longest Increasing Path in a Matrix
Data Structures & AlgorithmsHard

Given an m x n integers matrix, return the length of the longest increasing path in matrix. From each cell, you can either move in four directions: left, right, up, or down. You may not move diagonally or move outside the boundary (i.e., no wrap-around is allowed).

Q7
Hospital Management System Design
System Design

Design a Hospital Management System. Requirements:

  1. Patients are first registered at Reception, who assigns them a priority level (Critical, High, Medium, Low).
  2. Patients wait in a priority queue.
  3. An Initial Consultation Doctor picks the next patient from the queue.
  4. After consultation, patient is assigned to a Specialist Doctor.
  5. System should maintain treatment records.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!