SarthiQ

SarthiQ

Interview Preparation Guide

Zerodha
Questions & Answers

A comprehensive, expert-curated list of real interview questions to help you prepare effectively and land your dream job.

Document Details

Topic / Subject
Zerodha
Content Length
35 Curated Q&A
Generated On
October 4, 2026
Provided By
SarthiQ.com
Want to explore more questions & mock interviews? Click on 👉www.sarthiq.com
© 2026 SarthiQ Platform. All rights reserved.
www.sarthiq.com
Resume Upload Get Job in 90 Days Resume Builder AI Interview Coach Interview Questions Placement Committee Self Assessment Get Internship

Need Help?

[email protected]

Top Zerodha Interview Questions

NETFLIX
ORACLE
Adobe
NVIDIA
meta
IBM
wipro
TCS
cisco
intel
SAP
Uber

Zerodha Interview Questions

Practice with real Zerodha interview questions

01
A Software Engineer was asked
SarthiQ Zerodha
Medium
Asked in 2024
Q. How would you implement a function to count the frequency of elements in an array and identify duplicates? Provide code examples.
Ans. To count the frequency of elements in an array and identify duplicates, we can use a hashmap (or dictionary) to keep track of the count of each element. Here’s a simple approach to achieve this: Python Example:
python
**def count_frequencies(arr):**
    frequency_dict = {}
    duplicates = []

**    for item in arr:**
**        if item in frequency_dict:**
            frequency_dict[item] += 1
            if frequency_dict[item] == 2:  # Only add on first duplicate
                duplicates.append(item)
**        else:**
            frequency_dict[item] = 1

    return frequency_dict, duplicates

**Example usage**
array = [1, 2, 2, 3, 4, 4, 4, 5]
frequency, duplicates = count_frequencies(array)
print("Frequencies:", frequency)  # Output: {1: 1, 2: 2, 3: 1, 4: 3, 5: 1}
print("Duplicates:", duplicates)  # Output: [2, 4]
Java Example:
java
import java.util.HashMap;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        int[] array = {1, 2, 2, 3, 4, 4, 4, 5};
        HashMap<Integer, Integer> frequencyMap = countFrequencies(array);
        System.out.println("Frequencies: " + frequencyMap);
    }

    public static HashMap<Integer, Integer> countFrequencies(int[] arr) {
        HashMap<Integer, Integer> frequencyMap = new HashMap<>();
        List<Integer> duplicates = new ArrayList<>();

        for (int item : arr) {
            frequencyMap.put(item, frequencyMap.getOrDefault(item, 0) + 1);
            if (frequencyMap.get(item) == 2) {
                duplicates.add(item);
            }
        }
        System.out.println("Duplicates: " + duplicates);
        return frequencyMap;
    }
}
In both code examples, we iterate through the array, updating our frequency count in a map. We also track duplicates by checking when the count reaches 2. This solution effectively handles edge cases like empty arrays and works for any integer input.
Software EngineerCore Concept
02
A Backend Developer was asked
SarthiQ Zerodha
Medium
Asked in 2024
Q. What are SQL joins? Explain the different types of joins with examples using SQL queries.
Ans. SQL joins are used to combine records from two or more tables in a database based on related columns. The main types of SQL joins are INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN. 1. INNER JOIN: Returns records with matching values in both tables.
sql
SELECT a.id, a.name, b.order_id
   FROM customers a
   INNER JOIN orders b ON a.id = b.customer_id;
2. LEFT JOIN: Returns all records from the left table and matched records from the right table. If there is no match, NULL values are returned for columns from the right table.
sql
SELECT a.id, a.name, b.order_id
   FROM customers a
   LEFT JOIN orders b ON a.id = b.customer_id;
3. RIGHT JOIN: Returns all records from the right table and matched records from the left table. If there is no match, NULL values are returned for columns from the left table.
sql
SELECT a.id, a.name, b.order_id
   FROM customers a
   RIGHT JOIN orders b ON a.id = b.customer_id;
4. FULL OUTER JOIN: Returns all records when there is a match in either left or right table records.
sql
SELECT a.id, a.name, b.order_id
   FROM customers a
   FULL OUTER JOIN orders b ON a.id = b.customer_id;
These joins are crucial for retrieving data from multiple tables in relational databases effectively.
Backend DeveloperCore Concept
03
Full Stack Developer
SarthiQ Zerodha
Hard

Question:

How would you design a scalable system for XYZ...

04
Frontend Developer
SarthiQ Zerodha
Hard

Question:

How would you design a scalable system for XYZ...