InternDoor

Zoho interview prep

7 practice questions on the topics candidates reported from Zoho interviews, with answers. The questions are ours; each one links to the interview report that names its topic.

Practise them as a timed round

DSA 6

  1. DSAMedium

    You find the integer square root of n (the largest m with m * m <= n) by binary search over 0 to n. What do you do when m * m <= n?

    1. Return m at once
    2. Search the left half
    3. Keep m as the best answer so far and search the right half
    4. Restart the search from m
    Show the answer

    C. Keep m as the best answer so far and search the right half

    m fits, but a larger value might too, so remember it and look right. When m * m > n, look left. It takes O(log n) steps. Compare m <= n / m, or use 64-bit numbers, so m * m cannot overflow.

    This topic is named in a candidate’s interview report: Campus coding round, 2025, on Medium.

  2. DSAMedium

    What is the length of the longest run of consecutive integers in [100, 4, 200, 1, 3, 2], in any order?

    1. 3
    2. 4
    3. 6
    4. 2
    Show the answer

    B. 4

    1, 2, 3 and 4 are all present. Put every number in a hash set, start counting only from numbers whose predecessor is missing, and each number is visited a constant number of times: O(n).

    This topic is named in a candidate’s interview report: SDE campus interview, 2025, on Medium.

  3. DSAEasy

    Using a stack (push an opening bracket, pop on a closing one and check that it matches), which string is balanced?

    1. "([)]"
    2. "((()"
    3. "{[()()]}"
    4. "())("
    Show the answer

    C. "{[()()]}"

    "{[()()]}" closes every bracket in the reverse order it opened, leaving the stack empty. "([)]" fails when ) meets [ on top, "((()" leaves two openers on the stack, and "())(" pops an empty stack. One pass, O(n) time.

    This topic is named in a candidate’s interview report: SDE campus interview, 2025, on Medium.

  4. DSAMedium

    How many different strings of 3 pairs of balanced parentheses are there, such as "(())()"?

    1. 6
    2. 3
    3. 8
    4. 5
    Show the answer

    D. 5

    They are ((())), (()()), (())(), ()(()) and ()()(). The counts for 0, 1, 2, 3, 4 pairs are the Catalan numbers 1, 1, 2, 5, 14. A backtracking generator adds "(" while fewer than n are open and ")" while there are fewer closes than opens, so it never builds an unbalanced string.

    This topic is named in a candidate’s interview report: SDE campus interview, 2025, on Medium.

  5. DSAMedium

    A number is happy if repeatedly replacing it with the sum of the squares of its digits reaches 1. From 4 the values go 4, 16, 37, 58, 89, 145, 42, 20, 4, ... How does a program know when to stop and answer "not happy"?

    1. After 100 steps
    2. When a value has more digits than the starting number
    3. When a value is odd
    4. When a value repeats, found with a set of values seen or with slow and fast pointers
    Show the answer

    D. When a value repeats, found with a set of values seen or with slow and fast pointers

    The sum for a d-digit number is at most 81d, so the values soon stay small and must repeat; once one does, the sequence loops forever without reaching 1. A set finds the repeat, and Floyd's two pointers find it in O(1) memory, as for a cycle in a linked list. 19 is happy: 82, 68, 100, 1.

    This topic is named in a candidate’s interview report: SDE campus interview, 2025, on Medium.

  6. DSAMedium

    Evaluate the reverse Polish expression 5 1 2 + 4 * + 3 - with a stack: push each number, and for an operator pop two values and push the result.

    1. 14
    2. 20
    3. 12
    4. -14
    Show the answer

    A. 14

    Push 5, 1 and 2; + gives 3; push 4; * gives 12; + adds it to 5 for 17; push 3; - gives 17 - 3 = 14. For each operator the first value popped is the right-hand operand, which matters for - and /: taking them the other way round gives -14.

    This topic is named in a candidate’s interview report: SDE campus interview, 2025, on Medium.

OOP 1

  1. OOPMedium

    A parking-lot program charges cars, bikes and trucks by different rules. Which design lets you add buses later without editing the existing classes?

    1. One Vehicle class with a switch on a type string
    2. Copy each fee rule into the ParkingLot class
    3. An abstract Vehicle with an abstract fee(hours) that each subclass overrides, so the lot just calls vehicle.fee(hours)
    4. A public fee field that callers set by hand
    Show the answer

    C. An abstract Vehicle with an abstract fee(hours) that each subclass overrides, so the lot just calls vehicle.fee(hours)

    Adding Bus means writing one new subclass; ParkingLot and the other vehicles stay untouched, which is the open/closed principle through polymorphism. A switch on a type string has to be edited, and retested, every time a vehicle type is added.

    This topic is named in a candidate’s interview report: Software developer campus interview, 2026, on Reddit.

Prep for other employers

All employers
See who is hiring after Zoho

Engineering internships and entry-level jobs in India, newest first.