ZOHO Advance Coding Questions With Answers 2024 (C++/Java/Python), ZOHO Advance Coding Interview Questions

ZOHO Advance Coding Questions With Answers 2024 | Zoho Coding Interview Questions 2024 | Advance Level ZOHO Coding Interview Questions 2024

ZOHO Advance Coding Questions With Answers 2024: All of the fundamental algorithms, data structures, and programming concepts are included in the ZOHO Advance Coding Interview Questions. We can assist you if you’re interested in working at ZOHO but are unsure about how to get ready for the questions in the ZOHO Coding Interview Round. One of the most important sections of the Zoho Interview exam is the coding round. In this article, we covered a variety of sample ZOHO Advance Coding Questions and Answers 2024. We will talk about ZOHO Interview Coding Questions 2024/Advance Coding interview questions 2024 ZOHO in the below section.

This tutorial will teach you all there is to know about ZOHO Coding Interview Questions PDF/ ZOHO Advance Coding (C++/Java/Phyton) Model Questions. More details like Advance Level Zoho Coding Questions and Answers, ZOHO Advance Coding Questions and Answers, Coding Questions and Answers 2024 ZOHO, Cut Off, Salary, Hike, Increment, Annual Appraisal, etc. are available on this page.

ZOHO Advance Level Coding Interview Questions and Solutions 2024

Question 1: An automobile company manufactures both a two-wheeler (TW) and a four wheeler (FW). A company manager wants to make the production of both types of vehicles according to the given data below:

• 1st data, Total number of vehicle (two-wheeler + four-wheeler) =v
• 2nd data, Total number of wheels = W

The task is to find how many two-wheelers as well as four-wheelers need to manufacture as per the given data.

Example:

Input:
200 -> Value of V
540 -> Value of W

Output:
TW =130 FW=70

Explanation:
130+70 = 200 vehicles
(70*4) +(130*2) = 540 wheels

Constraints:

• 2<=W
• W%2=0
• V<W

Print “INVALID INPUT”, if inputs did not meet the constraints.

The input format for testing
The candidate has to write the code to accept two positive numbers separated by a new line.

• First Input line – Accept value of V.
• Second Input line- Accept value for W.

The output format for testing

• Written program code should generate two outputs, each separated by a single space character(see the example)
• Additional messages in the output will result in the failure of test case.

C++ PROGRAM

```#include <bits/stdc++.h>
using namespace std;
int main ()
{
int v, w;
cin >> v >> w;
float x = ((4 * v) - w) / 2;
if ((w & 1) || w < 2 || w <= v)
{
cout << "INVALID INPUT";
return 0;
}
cout << "TW=" << x << " " << "FW=" << v - x;

}```

JAVA PROGRAM

```import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int v=sc.nextInt();
int w=sc.nextInt();
float res=((4*v)-w)/2;
if(w>=2 && (w%2==0) && v<w)
System.out.println("TW= "+(int)(res)+" FW= "+(int)(v-res));
else
System.out.println("INVALID INPUT");
}
}```

PHYTHON PROGRAM

```v=5
w=6
if (w&1)==1 or w<2 or w<=v:
print("INVALID INPUT")
else:
x=((4*v) -w)//2
print("TW={0} FW={1}".format(x,v-x))```

Question 2: Given a string S(input consisting) of ‘*’ and ‘#’. The length of the string is variable. The task is to find the minimum number of ‘*’ or ‘#’ to make it a valid string. The string is considered valid if the number of ‘*’ and ‘#’ are equal. The ‘*’ and ‘#’ can be at any position in the string.
Note : The output will be a positive or negative integer based on number of ‘*’ and ‘#’ in the input string.

• (*>#): positive integer
• (#>*): negative integer
• (#=*): 0

Example 1:
Input 1:

• ###***   -> Value of S

Output :

• 0   → number of * and # are equal

C++ PROGRAM

```#include <bits/stdc++.h>
using namespace std;
int main()
{
string s="Hello";
int a=0,b=0;
getline(cin,s);
for(auto i:s)
if(i=='#')
a++;
else if(i=='*')
b++;
cout<<b-a;
}```

JAVA PROGRAM

```import java.util.*;
public class Main
{
public static void main(String[] args)
{

String str="Hello";
int count1=0,count2=0;
for(int i=0;i< str.length();i++)
{
if(str.charAt(i)=='*')
count1++;##
else if(str.charAt(i)=='#')
count2++;
}
System.out.println(count1-count2);
}
}```

PHYTHON PROGRAM

```s="Hello"
a=0
b=0
for i in s:
if i=='*':
a+=1
elif i=='#':
b+=1
print(a-b)```

Question 3: A parking lot in a mall has RxC number of parking spaces. Each parking space will either be  empty(0) or full(1). The status (0/1) of a parking space is represented as the element of the matrix. The task is to find index of the prpeinzta row(R) in the parking lot that has the most of the parking spaces full(1).

Note :
RxC- Size of the matrix
Elements of the matrix M should be only 0 or 1.

Example 1:
Input :
3   -> Value of R(row)
3    -> value of C(column)
[0 1 0 1 1 0 1 1 1] -> Elements of the array M[R][C] where each element is separated by new line.
Output :
3  -> Row 3 has maximum number of 1’s

Example 2:
input :
4 -> Value of R(row)
3 -> Value of C(column)
[0 1 0 1 1 0 1 0 1 1 1 1] -> Elements of the array M[R][C] Output :
4  -> Row 4 has maximum number of 1’s

C++ PROGRAM

```#include <bits/stdc++.h>
using namespace std;
int main()
{
int r,c,a,sum=0,m=INT_MIN,in=0;
cin>>r>>c;
for(int i=0;i<r;i++) {="" for(int="" j="0;j<c;j++)" cin="">>a;
sum+=a;
}
if(sum>m)
{
m=sum;
in=i+1;
}
sum=0;
}
cout<< in;
}</r;i++)>```

JAVA PROGRAM

```import java.util.*;
class Main
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int row=sc.nextInt();
int col=sc.nextInt();
int arr[][]=new int[row][col];
for(int i=0;i< row;i++)
for(int j=0;j< col;j++)
arr[i][j]=sc.nextInt();

int max=0,count=0,index=0;
for(int i=0;i< row;i++)
{
count=0;
for(int j=0;j< col;j++)
{
if(arr[i][j]==1)
count++;
}
if(count>max)
{
max=count;
index=i+1;
}
}
System.out.println(index);
}
}```

PHYTHON PROGRAM

```r=int(input())
c=int(input())
sum=0
m=0
id=0
for i in range(r):
for j in range(c):
sum+=int(input())
if sum>m:
m=sum
id=i+1
sum=0
print(id)```
 JOB ALERT ON INSTAGRAM FOLLOW NOW>> JOB ALERT ON YOUR EMAIL DAILY SUBSCRIBE NOW>>

Keep watch dailyrecruitment.in site for more details about jobs and education related updates.

Govt Jobs by Qualifications

Education & Vacancies Salary Apply Link
10th Pass Govt Jobs - 5,000 Vacancies Rs. 5,200 - 63,200 Apply Now
12th Pass Govt Jobs - 18,000+ Vacancies Rs. 5,200 - 92,300 Apply Now
ITI Pass Jobs - 3,500 Vacancies Rs. 5,200 - 35,000 Apply Now
Any Graduate Jobs - 19,100 Vacancies Rs. 5,200 - 92,300 Apply Now
Central Govt Jobs Rs. 5,200 - 17,000 Apply Now
Bank Jobs - 1,000 Vacancies Rs. 5,200 - 29,200 Apply Now
Diploma Jobs - 9,300 Vacancies Rs. 5,200 - 35,000 Apply Now
BTech/BE Jobs - 18,000 Vacancies Rs. 15,000 - 1,00,000 Apply Now
Data Entry Jobs - 1,300 Vacancies Rs. 5,200 - 29,200 Apply Now
Private Jobs Rs. 10,000 - 67,700 Apply Now