Problem database last updated: June 20, 2025

ZZoho logo

Zoho Coding Interview Questions

100 problems · 32 Easy, 58 Medium, 10 Hard · Ranked #11 of 458

Difficulty breakdown

32 Easy

32% · avg 23%

58 Medium

58% · avg 59%

10 Hard

10% · avg 18%

Top topics

array
61%
string
40%
two-pointers
23%1.7x
dynamic-programming
20%
math
16%
hash-table
14%

Interview profile

Based on 100 reported problems, Zoho interviews are in line with industry averages - 10% Hard vs 18% overall. The majority (58%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.

Compared to the industry average, Zoho puts unusual emphasis on simulation (9% of problems, 2.1x the industry average), two-pointers (23% of problems, 1.7x the industry average), backtracking (9% of problems, 1.7x the industry average). If you're short on time, these are the categories to double down on.

The most common topics are array (61%), string (40%), two-pointers (23%), dynamic-programming (20%). Problems below are sorted by frequency, the ones at the top are asked most often.

All 100 problems

Climbing Stairs

Solve

You are climbing a staircase. It takes n steps to reach the top.

EasyVery Likely
mathdynamic-programmingmemoization

Spiral Matrix

Solve

Given an m x n matrix, return all elements of the matrix in spiral order.

MediumVery Likely
arraymatrixsimulation

Best Time to Buy and Sell Stock

Solve

You are given an array prices where prices[i] is the price of a given stock on the ith day.

EasyVery Likely
arraydynamic-programming

Longest Palindromic Substring

Solve

Given a string s, return the longest palindromic substring in s.

MediumVery Likely
two-pointersstringdynamic-programming

Group Anagrams

Solve

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

MediumVery Likely
arrayhash-tablestring

Longest Substring Without Repeating Characters

Solve

Given a string s, find the length of the longest substring without duplicate characters.

MediumVery Likely
hash-tablestringsliding-window

Decode String

Solve

Given an encoded string, return its decoded string.

MediumVery Likely
stringstackrecursion

Valid Parentheses

Solve

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

EasyVery Likely
stringstack

Number of Islands

Solve

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

MediumVery Likely
arraydepth-first-searchbreadth-first-search

Move Zeroes

Solve

Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements.

EasyVery Likely
arraytwo-pointers

Trapping Rain Water

Solve

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.

HardVery Likely
arraytwo-pointersdynamic-programming

Merge Intervals

Solve

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...

MediumVery Likely
arraysorting

Two Sum

Solve

Given an array of integers nums and an integer target, return the indices of the two numbers that add up to target.

EasyVery Likely
arrayhash-map

Sort Even and Odd Indices Independently

Solve

You are given a 0-indexed integer array nums. Rearrange the values of nums according to the following rules:

EasyVery Likely
arraysorting

Compare Version Numbers

Solve

Given two version strings, version1 and version2, compare them. A version string consists of revisions separated by dots '.'. The value of the revision is its i...

MediumVery Likely
two-pointersstring

Rotate Image

Solve

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).

MediumVery Likely
arraymathmatrix

Largest Number

Solve

Given a list of non-negative integers nums, arrange them such that they form the largest number and return it.

MediumVery Likely
arraystringgreedy

Generate Parentheses

Solve

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

MediumVery Likely
stringdynamic-programmingbacktracking

Find Winner on a Tic Tac Toe Game

Solve

Tic-tac-toe is played by two players A and B on a 3 x 3 grid. The rules of Tic-Tac-Toe are:

EasyVery Likely
arrayhash-tablematrix

Zigzag Conversion

Solve

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better...

MediumVery Likely
string

Rotate Array

Solve

Given an integer array nums, rotate the array to the right by k steps, where k is non-negative.

MediumVery Likely
arraymathtwo-pointers

Excel Sheet Column Number

Solve

Given a string columnTitle that represents the column title as appears in an Excel sheet, return its corresponding column number.

EasyVery Likely
mathstring

Longest Common Prefix

Solve

Write a function to find the longest common prefix string amongst an array of strings.

EasyLikely
arraystringtrie

Container With Most Water

Solve

You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).

MediumLikely
arraytwo-pointersgreedy

Remove All Occurrences of a Substring

Solve

Given two strings s and part, perform the following operation on s until all occurrences of the substring part are removed:

MediumLikely
stringstacksimulation

Regular Expression Matching

Solve

Given an input string s and a pattern p, implement regular expression matching with support for '.' and '' where:

HardLikely
stringdynamic-programmingrecursion

Wildcard Matching

Solve

Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '' where:

HardLikely
stringdynamic-programminggreedy

Roman to Integer

Solve

Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.

EasyLikely
hash-tablemathstring

Word Pattern

Solve

Given a pattern and a string s, find if s follows the same pattern.

EasyLikely
hash-tablestring

Text Justification

Solve

Given an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justifie...

HardLikely
arraystringsimulation

Median of Two Sorted Arrays

Solve

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.

HardLikely
arraybinary-searchdivide-and-conquer

Valid Sudoku

Solve

Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:

MediumLikely
arrayhash-tablematrix

Basic Calculator II

Solve

Given a string s which represents an expression, evaluate this expression and return its value.

MediumLikely
mathstringstack

Replace Elements with Greatest Element on Right Side

Solve

Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with -1.

EasyLikely
array

Non-overlapping Intervals

Solve

Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the int...

MediumLikely
arraydynamic-programminggreedy

Edit Distance

Solve

Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2.

MediumLikely
stringdynamic-programming

Happy Number

Solve

Write an algorithm to determine if a number n is happy.

EasyLikely
hash-tablemathtwo-pointers

Longest Valid Parentheses

Solve

Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.

HardLikely
stringdynamic-programmingstack

Merge Sorted Array

Solve

You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and num...

EasyLikely
arraytwo-pointerssorting

Product of Array Except Self

Solve

Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].

MediumLikely
arrayprefix-sum

Count and Say

Solve

The count-and-say sequence is a sequence of digit strings defined by the recursive formula:

MediumLikely
string

3Sum

Solve

Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.

MediumLikely
arraytwo-pointerssorting

Restore IP Addresses

Solve

A valid IP address consists of exactly four integers separated by single dots. Each integer is between 0 and 255 (inclusive) and cannot have leading zeros.

MediumLikely
stringbacktracking

Search in Rotated Sorted Array

Solve

There is an integer array nums sorted in ascending order (with distinct values).

MediumLikely
arraybinary-search

Find the Duplicate Number

Solve

Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.

MediumLikely
arraytwo-pointersbinary-search

Decode Ways

Solve

You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping:

MediumLikely
stringdynamic-programming

Jump Game

Solve

You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length...

MediumLikely
arraydynamic-programminggreedy

Best Time to Buy and Sell Stock II

Solve

You are given an integer array prices where prices[i] is the price of a given stock on the ith day.

MediumLikely
arraydynamic-programminggreedy

Letter Combinations of a Phone Number

Solve

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.

MediumLikely
hash-tablestringbacktracking

Sort Colors

Solve

Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order...

MediumLikely
arraytwo-pointerssorting

Combination Sum

Solve

Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum...

MediumLikely
arraybacktracking

Largest Rectangle in Histogram

Solve

Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the his...

HardLikely
arraystackmonotonic-stack

Partition Equal Subset Sum

Solve

Given an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements in both subsets is equal or false oth...

MediumLikely
arraydynamic-programming

Maximum Subarray

Solve

Given an integer array nums, find the subarray with the largest sum, and return its sum.

MediumLikely
arraydivide-and-conquerdynamic-programming

Palindrome Number

Solve

Given an integer x, return true if x is a palindrome, and false otherwise.

EasyLikely
math

Remove Duplicates from Sorted Array

Solve

Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order o...

EasyLikely
arraytwo-pointers

Reverse Vowels of a String

Solve

Given a string s, reverse only all the vowels in the string and return it.

EasyLikely
two-pointersstring

Find the Index of the First Occurrence in a String

Solve

Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.

EasyLikely
two-pointersstringstring-matching

3Sum Closest

Solve

Given an integer array nums of length n and an integer target, find three integers at distinct indices in nums such that the sum is closest to target.

MediumLikely
arraytwo-pointerssorting

Word Search

Solve

Given an m x n grid of characters board and a string word, return true if word exists in the grid.

MediumLikely
arraystringbacktracking

Spiral Matrix II

Solve

Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order.

MediumLikely
arraymatrixsimulation

N-Queens

Solve

The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.

HardLikely
arraybacktracking

Word Search II

Solve

Given an m x n board of characters and a list of strings words, return all words on the board.

HardLikely
arraystringbacktracking

Single Number

Solve

Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.

EasyLikely
arraybit-manipulation

Longest Consecutive Sequence

Solve

Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.

MediumLikely
arrayhash-tableunion-find

Integer to English Words

Solve

Convert a non-negative integer num to its English words representation.

HardLikely
mathstringrecursion

Add to Array-Form of Integer

Solve

The array-form of an integer num is an array representing its digits in left to right order.

EasyLikely
arraymath

Diagonal Traverse

Solve

Given an m x n matrix mat, return an array of all the elements of the array in a diagonal order.

MediumLikely
arraymatrixsimulation

Merge Strings Alternately

Solve

You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than the other,...

EasyLikely
two-pointersstring

Shuffle the Array

Solve

Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn].

EasyLikely
array

Word Break

Solve

Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.

MediumSometimes
arrayhash-tablestring

Reverse Words in a String

Solve

Given an input string s, reverse the order of the words.

MediumSometimes
two-pointersstring

Integer to Roman

Solve

Seven different symbols represent Roman numerals with the following values:

MediumSometimes
hash-tablemathstring

Find Triangular Sum of an Array

Solve

You are given a 0-indexed integer array nums, where nums[i] is a digit between 0 and 9 (inclusive).

MediumSometimes
arraymathsimulation

Maximum Population Year

Solve

You are given a 2D integer array logs where each logs[i] = [birthi, deathi] indicates the birth and death years of the ith person.

EasySometimes
arraycountingprefix-sum

Find the Winner of the Circular Game

Solve

There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More formally, moving clockwis...

MediumSometimes
arraymathrecursion

Minimum Time Difference

Solve

Given a list of 24-hour clock time points in "HH:MM" format, return the minimum minutes difference between any two time-points in the list.

MediumSometimes
arraymathstring

House Robber

Solve

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from rob...

MediumSometimes
arraydynamic-programming

Coin Change

Solve

You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.

MediumSometimes
arraydynamic-programmingbreadth-first-search

Permutations

Solve

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

MediumSometimes
arraybacktracking

Search Insert Position

Solve

Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were ins...

EasySometimes
arraybinary-search

Longest Increasing Subsequence

Solve

Given an integer array nums, return the length of the longest strictly increasing subsequence.

MediumSometimes
arraybinary-searchdynamic-programming

Subsets

Solve

Given an integer array nums of unique elements, return all possible subsets (the power set).

MediumSometimes
arraybacktrackingbit-manipulation

Reverse Only Letters

Solve

Given a string s, reverse the string according to the following rules:

EasySometimes
two-pointersstring

Asteroid Collision

Solve

We are given an array asteroids of integers representing asteroids in a row. The indices of the asteroid in the array represent their relative position in space...

MediumSometimes
arraystacksimulation

Remove Duplicates from Sorted Array II

Solve

Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. The relative or...

MediumSometimes
arraytwo-pointers

Binary Search

Solve

Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then ret...

EasySometimes
arraybinary-search

Excel Sheet Column Title

Solve

Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet.

EasySometimes
mathstring

Isomorphic Strings

Solve

Given two strings s and t, determine if they are isomorphic.

EasySometimes
hash-tablestring

Palindrome Linked List

Solve

Given the head of a singly linked list, return true if it is a palindrome or false otherwise.

EasySometimes
linked-listtwo-pointersstack

Middle of the Linked List

Solve

Given the head of a singly linked list, return the middle node of the linked list.

EasySometimes
linked-listtwo-pointers

Remove K Digits

Solve

Given string num representing a non-negative integer num, and an integer k, return the smallest possible integer after removing k digits from num.

MediumSometimes
stringstackgreedy

Next Permutation

Solve

A permutation of an array of integers is an arrangement of its members into a sequence or linear order.

MediumSometimes
arraytwo-pointers

First Unique Character in a String

Solve

Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1.

EasySometimes
hash-tablestringqueue

Cinema Seat Allocation

Solve

A cinema has n rows of seats, numbered from 1 to n and there are ten seats in each row, labelled from 1 to 10 as shown in the figure above.

MediumSometimes
arrayhash-tablegreedy

Remove All Adjacent Duplicates In String

Solve

You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them.

EasySometimes
stringstack

The Latest Time to Catch a Bus

Solve

You are given a 0-indexed integer array buses of length n, where buses[i] represents the departure time of the ith bus. You are also given a 0-indexed integer a...

MediumSometimes
arraytwo-pointersbinary-search

Maximum Sum of an Hourglass

Solve

You are given an m x n integer matrix grid.

MediumSometimes
arraymatrixprefix-sum

Reverse Linked List II

Solve

Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to position right,...

MediumSometimes
linked-list

Unique Binary Search Trees

Solve

Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n.

MediumSometimes
mathdynamic-programmingtree

How often are these problems asked?

Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Zoho interviews.

Very Likely

75-100%

Likely

50-74%

Sometimes

25-49%

Rare

0-24%

Preparing for your Zoho coding interview

Zoho interviews focus heavily on array, string, two-pointers problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.

Beyond solving problems, practice explaining your approach. Zoho interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.

Looking for more companies? Browse all 458 companies in our directory, or sharpen your fundamentals with our free data structure visualizers and AI-powered DSA tutor.

Frequently Asked Questions

What coding problems does Zoho ask in interviews?add

Zoho has been reported to ask 100 distinct coding problems. The most common topics are array, string, two-pointers. 32 are Easy difficulty, 58 are Medium, and 10 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.

How hard are Zoho coding interviews?add

Based on 100 reported problems, Zoho interviews are in line with industry averages - 10% Hard vs 18% overall. 58% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.

How should I prepare for a Zoho coding interview?add

Start with the highest-frequency problems listed on this page. Focus on the core topics: array, string, two-pointers. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.

Other companies to explore

Ready to ace your Zoho interview?

Simulate a real Zoho coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.

Simulate a Zoho interview with AIarrow_forward