Kotak Bank Interview Experience

Posted
26 Jan 2026
307 reads

Summary

I had an interview experience with Kotak Bank, which included a Bar Raiser round with a coding question, a Low-Level Design problem, and several Distributed Architecture questions.

How it went

Round 1: Bar Raiser round

Coding Question:

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

Input: matrix = [[1,1,1],[1,0,1],[1,1,1]] Output: [[1,0,1],[0,0,0],[1,0,1]]

Input: matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]]

Output: [[0,0,0,0],[0,4,5,0],[0,3,1,0]]

Constraints:

m == matrix.length n == matrix[0].length 1 <= m, n <= 200 -2^31 <= matrix[i][j] <= 2^31 - 1

class Solution {
    public int[][] solve(int[][] input) {
        
        int m = input.length;
        int n = input[0].length;

        // boolean[] rows = new boolean[m];
        // boolean[] cols = new boolean[n];

        boolean firstRow = false;
        boolean firstCol = false;
        for(int i = 0; i < m; i++) {
            for(int j = 0; j < n; j++) {
                if (input[i][j] == 0) {
                    if(i == 0) {
                        firstRow = true;
                    }
                    if (j == 0) {
                        firstCol = true;
                    }
                    input[i][0] = 0;
                    input[0][j] = 0;
                }
            }
        }

        for(int i = 1; i < m; i++) {
            for(int j = 1; j < n; j++) {
                if (input[i][0] == 0 || input[0][j] == 0) {
                    input[i][j] = 0;
                }
            }
        }

        if(firstRow) {
            for(int j = 0; j < n; j++) {
                input[0][j] = 0;
            }
        }

        if (firstCol) {
            for(int i = 0; i < m; i++) {
                input[i][0] = 0;
            }
        }

        return input;
    }
}

class Main {

    public static void main(String[] args) {
        // int[][] input = {
        //     {1,1,1},
        //     {1,0,1},
        //     {1,1,1}
        // };

        int[][] input = {
            {1,0,0},
            {2,3,4},
            {5,6,7}
        };

        /*
[
 [1, 0, 0],
 [2, 3, 4],
 [5, 6, 7]
]
[
 [1, 2, 0],
 [3, 4, 0],
 [5, 6, 7]
]
[
 [1, 2, 3, 4],
 [5, 0, 7, 8],
 [0,10,11,12],
 [13,14,15,0]
]
         */

        // int[][] input = {
        //     {0,1,2,0},
        //     {3,4,5,2},
        //     {1,3,1,5}
        // };

        Solution solution = new Solution();
        input = solution.solve(input);

        for(int i = 0; i < input.length; i++) {
            for (int j = 0; j < input[i].length; j++) {
                System.out.print(input[i][j] + " ");
            }
            System.out.println();
        }
    }
}

LLD

Online Marketplace - Buy & Sell Products

Prompt: Design the backend components for an online marketplace where users can buy and sell products. Consider features such as user authentication, product listing, search functionality, shopping cart, and order management.

šŸ”ø Sub-components to explore: User Authentication – Signup, Login, JWT-based session Product Listing – Sellers can create, update, delete, and view listings Search Functionality – Full-text search and filtering Shopping Cart – CRUD operations on items Order Management – Placing, viewing, and cancelling orders

Distributed Architecture Questions:

  1. Explain how you would ensure data consistency across multiple nodes in a distributed database.
  2. Discuss the challenges and techniques for handling distributed session management.
  3. Explain the role of distributed messaging systems like Kafka or RabbitMQ in a backend system.

Questions asked (5)

  1. 01

    Set Matrix Zeroes

    Data Structures & Algorithms Ā· Medium

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

    Input: matrix = [[1,1,1],[1,0,1],[1,1,1]] Output: [[1,0,1],[0,0,0],[1,0,1]]

    Input: matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]]

    Output: [[0,0,0,0],[0,4,5,0],[0,3,1,0]]

    Constraints:

    m == matrix.length n == matrix[0].length 1 <= m, n <= 200 -2^31 <= matrix[i][j] <= 2^31 - 1

  2. 02

    Low-Level Design: Online Marketplace

    System Design

    Prompt: Design the backend components for an online marketplace where users can buy and sell products. Consider features such as user authentication, product listing, search functionality, shopping cart, and order management.

    šŸ”ø Sub-components to explore: User Authentication – Signup, Login, JWT-based session Product Listing – Sellers can create, update, delete, and view listings Search Functionality – Full-text search and filtering Shopping Cart – CRUD operations on items Order Management – Placing, viewing, and cancelling orders

  3. 03

    Distributed Database Data Consistency

    System Design

    Explain how you would ensure data consistency across multiple nodes in a distributed database.

  4. 04

    Distributed Session Management Challenges

    System Design

    Discuss the challenges and techniques for handling distributed session management.

  5. 05

    Role of Distributed Messaging Systems

    System Design

    Explain the role of distributed messaging systems like Kafka or RabbitMQ in a backend system.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Kotak Bank recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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