Autocoder

Zerodha Interview Questions and Answers

Last updated 2026-11-19

Zerodha is a stockbroker whose technology team is known for being small and hands-on, and its engineers have written publicly about running Go, PostgreSQL and Redis. Interviews are therefore commonly described as practical: how things work underneath, how you debug, and what you have actually built. This page offers practice questions on those themes with worked answers.

They are practice questions on the commonly reported topics, not real papers. For timed problems see Zerodha coding round questions, and for the design approach read how to crack the system design interview.

Rounds as commonly reported

Candidate accounts describe a short screening, one or more technical conversations or a practical task, and a discussion with senior engineers or the founders' team about what you have built, including open-source work. The company does not publish a fixed process and hires in small numbers, so use this as a rough pattern only.

What to prepare

Be able to explain your projects in depth, know your main language and one datastore well, understand HTTP, TCP and Linux basics, and learn the vocabulary of markets: order types, tick data, the order book and settlement. Real code you have written, including side projects, carries more weight than certificates.

Hiring status

We hold no sourced hiring dates, numbers or process facts for Zerodha and there is no /hiring page for it on this site, so none are stated. Check the company's own careers page for current roles.

Zerodha Interview Questions and Answers: questions with worked answers

  1. 1

    How do goroutines and channels work in Go?

    medium

    Goroutines are lightweight functions scheduled by the Go runtime onto a small number of OS threads, starting with a few kilobytes of stack. Channels are typed conduits for communication: sends and receives synchronise, a buffered channel decouples them up to its capacity. The motto is to share memory by communicating. Remember to close channels only from the sender, to avoid goroutine leaks by giving every goroutine a way to exit (a context or done channel), and to use sync.Mutex when sharing state is simpler.

  2. 2

    How would you build a worker pool in Go?

    medium

    Start N goroutines reading jobs from a channel and writing results to another. The producer sends jobs and closes the jobs channel; a WaitGroup tracks the workers and closes the results channel when all finish.

    go
    func pool(jobs []int, n int) []int {
        in := make(chan int)
        out := make(chan int, len(jobs))
        var wg sync.WaitGroup
        for i := 0; i < n; i++ {
            wg.Add(1)
            go func() {
                defer wg.Done()
                for j := range in {
                    out <- j * j
                }
            }()
        }
        for _, j := range jobs {
            in <- j
        }
        close(in)
        wg.Wait()
        close(out)
        var res []int
        for v := range out {
            res = append(res, v)
        }
        return res
    }
  3. 3

    How does a PostgreSQL index work and how do you check a query is using it?

    medium

    The default B-tree index keeps sorted keys so equality and range lookups avoid a full table scan. Use EXPLAIN (or EXPLAIN ANALYZE to run the query) to see whether the plan uses an index scan or a sequential scan and compare estimated with actual rows. A planner may choose a sequential scan when most rows match. Composite indexes follow the leftmost-prefix rule, partial indexes cover a subset, and indexes cost write time and disk.

  4. 4

    What are the main Redis data structures and what is each good for?

    medium

    Strings for counters and cached values, hashes for objects, lists for queues, sets for unique membership, sorted sets for leaderboards and time-ordered data, streams for logs, and bitmaps or HyperLogLog for compact counting. Redis is mostly single-threaded for commands, so each command is atomic, but long commands block others. Persistence is through RDB snapshots or the append-only file; both involve trade-offs between speed and durability.

  5. 5

    Explain the common order types in the market.

    easy

    A market order executes immediately at the best available price. A limit order executes only at the specified price or better and may rest in the order book. A stop-loss order becomes active when the price reaches a trigger, then executes as a market or limit order. Orders have validity such as day or immediate-or-cancel. This is general market knowledge, not advice; design questions often hinge on how each type interacts with the order book.

  6. 6

    The market opens and traffic spikes a hundredfold within seconds. How do you cope?

    hard

    Plan for the known spike. Pre-scale or pre-warm capacity before the open rather than relying on reactive autoscaling. Cache read-heavy data, put limits and queues in front of expensive operations, keep the critical path short and free of slow dependencies, and shed non-essential features first. Use load tests that replay open-like traffic, and watch saturation metrics such as queue depth and connection pool use, not just CPU.

  7. 7

    How would you compress a stream of price ticks?

    medium

    Prices change slightly between ticks, so store the first value and then deltas, which are small integers. Store prices as integers (paise) instead of floats, and encode deltas with variable-length integers so small values take one byte. Batch ticks per symbol and compress blocks. Timestamps likewise compress as deltas from the previous tick. The receiver reverses the process with a running sum.

    python
    def encode(ticks):
        out, prev = [], 0
        for t in ticks:
            out.append(t - prev)
            prev = t
        return out
    
    def decode(deltas):
        out, cur = [], 0
        for d in deltas:
            cur += d
            out.append(cur)
        return out
  8. 8

    A Linux server is slow. What do you check first?

    medium

    Start with load and resource saturation: uptime and top for CPU, free for memory and swap, iostat or vmstat for disk waits, and ss or netstat for connections. Look at dmesg and logs for errors such as out-of-memory kills. Use strace or perf on the suspect process, and check for a runaway process, full disk or exhausted file descriptors. Form a hypothesis, test it, and change one thing at a time.

  9. 9

    How does TOTP-based two-factor authentication work?

    medium

    The server and the user's app share a secret. Both compute an HMAC of the current time step (commonly 30 seconds) with the secret and truncate it to a six-digit code. The server accepts the code for the current step, usually allowing one step either side for clock drift, and rejects a code that was already used. The secret must be stored encrypted, and rate limiting prevents brute force of the six digits.

  10. 10

    What happens in a TCP connection from start to close?

    medium

    The client sends SYN, the server replies SYN-ACK and the client sends ACK, which is the three-way handshake. Data flows with sequence numbers, acknowledgements, retransmission and flow control through the receive window, plus congestion control. Closing uses FIN and ACK from each side, then TIME_WAIT on the side that closes first, which can exhaust ports on a busy client if connections are not reused.

  11. 11

    Tell me about something you built that you are proud of.

    easy

    Zerodha-style interviews commonly probe depth, so choose something you really wrote. Explain why you built it, the architecture and one hard problem you solved, what broke and what you would change. Be ready to open the code and discuss it line by line.

  12. 12

    Why Zerodha?

    easy

    Be specific and honest: you like small, engineering-led teams, simple robust technology and products with real users. Refer to something you have actually read from the company's engineering writing or used as a customer, and say what you hope to learn. Avoid generic admiration.

Frequently asked questions

Does Zerodha ask DSA questions?

Candidate accounts vary; some mention practical engineering discussions more than puzzle-style DSA. Prepare fundamentals and be ready for either.

Do I need to know Go?

The company has written publicly about using Go, but required skills depend on the role. Read the job description.

Does open-source work help?

Real, reviewable work is commonly valued in practical hiring processes, so put your best projects forward.

Where can I see openings?

On Zerodha's own careers page. This site has no sourced hiring data for the company.

Related guides

More in Company Interview Questions

See all in this section