Zoho Interview Coding Questions with Answers

Zoho Interview Coding Questions with Answers

Zoho is one of the leading SAAS firms in the world having its headquarters in Chennai, India. It has more than 30 products for different types of applications like CRM, Sales, Marketing, Support, HR, Payroll, Project management, and much more.

This is one of the very good and well-established product companies in India which hires software engineers freshers and experienced to work on awesome products that solve complex and real-life problems.

If you are applying for Zoho, make sure you have your resume created in a standard format and with ATS compliance. Most of the candidates get shortlisted through the ATS (Applicant Tracking System) tool.

Once your profile gets shortlisted, you will be asked for further interviews.

Zoho Interview Coding Questions

For freshers, they mostly ask programming questions based on an array, string, and Linked lists. To crack this round, check data structure and interview coding questions. Practicing these coding questions helped me to crack this round.

Coding Question 1: Based on String

Input: a1b2c3
Output: abbccc
Caution: Don't use inbuilt functions

Watch this video for a complete explanation. I have solved this problem and explained it in detail.

Explanation:

  • After we have the number 1 so a repeats one time = a
  • After b we have the number 2 so it repeats two times = bb
  • After c we have the number 3 so it repeats three times = ccc
  • Final Output: abbccc

Algorithm:

  • Start the Program
  • Get the input as a single string
  • Loop through the entire string to find the numbers
  • After finding the number, Repeat the previous character the same number of times
  • For example a4 ( So you find the number 4 and print a 4 times)
  • Follow step 3,4 for the entire string
  • End the Program

C Program

Prerequisite:

Code:

#include <stdio.h>
int main()
{
  char str[100]="a1b2c4";
  int len=0;

  while(str[length]!='\0')
    len++;

  for(int i=0; i<len; i++)
  {
    if(str[i]>'0' && str[i]<'9')
    {
      int num=str[i]-'0';
      for(int j=0; j < num; j++)
      {
        printf("%c", str[i-1]);
      }
    }
  }

}

Output:

abbcccc

Python Program

If you know the Python basic syntax, you can implement the same program in Python in very few lines of code. That’s the beauty of Python programming.

Prerequisite:

Code:

msg="a1b2c4"
out = ""

for ind in range(0, len(msg), 2):
  out += (msg[ind] * int(msg[ind+1]))

print(out)

Output:

abbcccc

Coding Question 2: Based on the Array

Input: [2,1,0,-8,-9]
Output: 0.4 , 0.2 , 0.4

Explanation:

  • First, find the total number of elements in the array = 5
  • Find the total number of positive numbers=2
  • Find the total number of neutral numbers=1
    (0 is the only neutral number)
  • Find the total number of negative numbers=2
  • Output = [ (no of positive number/length of the array), (no of neutral numbers/length of the array), (no of negative numbers/length of the array) ]
    =[â…–, â…•, â…–]
    =[0.4, 0.2, 0.4]

Algorithm:

  1. Start the Program
  2. Get the input as an array
  3. Find the length of the array
  4. Find the number of positive, neutral, and negative numbers
  5. Divide each one of the above results with the length of the array and print the output as an array( Make sure you print the output in float format and use 0.1f for one precision)
  6. Stop the program

C Program

Here we are using sizeof() operator.

#include<stdio.h>
int main()
{
  int a[]={1,2,4,-8,-1,0};

  int n=sizeof(a)/sizeof(int);
  int np, nz, nn;
  for(int i=0; i<n; i++)
  {
    if(a[i]>0)
    {
      np++;
    }
    else if(a[i]<0)
    {
      ne --;
    }
    else
    {
      nz++;
    }
  }
  printf("%0.1f , %0.1f , %0.1f ", np/n, nz/n, nn/n);
  return 0;
}

Output:

0.6 , 0.2, 0.4

Python Program

Let’s solve the same question in Python programming.

list_data =  [2,1,0,-8,-9]

count_positive = 0
count_neutral = 0
count_negative = 0
length_arr = len(list_data)

for val in list_data:
  if val>0:
    count_positive += 1
  elif val<0:
    count_negative += 1
    else:
      count_neutral += 1

print(
  count_positive/length_arr, 
  count_neutral/length_arr, 
  count_negative/length_arr
)

Output:

0.4 0.2 0.4

There can be multiple types of coding questions asked based on the string, array. If you get the basics, you can solve these coding challenges in C/C++, Java, Python, or any programming language of your choice.

Also, check the technical interview coding questions asked in Zoho for freshers (based on experience shared by the candidate).


Editors’ Note: This is all about Zoho interview coding questions and experiences shared by R.Manoj Aiyer. We wish him all the best!

If you have any questions, you can ask in the comment section.

22 Comments

  1. but on my side, the code is not accepting the error was showing in the for loop the error is they have do not declare for the int i and the statement missing.

  2. Whether we can choose Python for the level 2 coding test or we must do it only in C?
    I’m having my level2 coding test tomorrow pls help me out.

    1. As per I know, you can choose the programming language of your choice. If the job requirement is for a specific programming language (let’s say Python) specialist, then it is recommended you use that language (Python) for competitive coding.

Leave a Reply

Your email address will not be published. Required fields are marked *