[go: up one dir, main page]

0% found this document useful (1 vote)
2K views11 pages

Zoho Interview Questions - 2024 batch

Cool shit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
2K views11 pages

Zoho Interview Questions - 2024 batch

Cool shit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Round 2 Questions :

There were 2 sets of questions so, the 1st set had 2 questions and after completing it
then you will be given the next set of questions(Here 3 questions) and here you have to build a
logic and explain the interviewer and then code the solution.

Set - 1 :(Both are pattern Questions)


Constraints : Arrays or List is not allowed to store the elements in the pattern

1.
Input : n = 3
output :

1
232
34543

Input : n = 5
output :

1
232
34543
4567654
567898765

2 . Print a X - Pattern for an input String of odd length.

Input : PROGRAM

P M
R A
O R
G
O R
R A
P M
Input : ZOHOFINANCE

output :

Z E
O C
H N
O A
FN
I
FN
O A
H N
O C
Z E

Set - 2 :(Questions are of basic arrays and String manipulations)


Constraints : Don't Use inbuilt methods in java or python(max,min etc…) and
datastructures(HashMap,dictionary,Set,ArrayList etc…)

1 . You have a String s and the String contains lower case alphabets only so write a program to
return a longest substring between 2 vowels in the string.
the longest substring should not contain vowels in it.

Input : alphabet
output : lph

Input : america
output : m,r,c

Input : single
output : ngl
2. Sort the given integer array in format
1st element - 1st maximum of the array
2nd element - 1st minimum of the array
3rd element - 2nd maximum of the array
4th element - 2nd minimum of the array
5th element - 3rd maximum of the array
6th element - 3rd minimum of the array…..This pattern follows

Constraints : Don't use any extra array(i.e Space Complexity - O(1) ) ,


modify the array in-place .
Don't use any inbuilt sort method of java or python

Input : array = {8,16,10,4,12,6,-3,0}


output : array = {16, -3, 12, 0, 10, 4, 8, 6}

Input : array = {5,3,1,7,2,4,6}


output : array = {7, 1, 6, 2, 5, 3, 4}

3 . Find Whether the matrix is upper or lower triangle matrix.

Input : {{4,6,1,4},
{0,3,5,9},
{0,0,6,2},
{0,0,0,8}}

output: Upper Triangular Matrix

Input : {{1,0},
{1,1}}
output: Lower Triangular Matrix

Input : {{5,0,0},
{7,2,6},
{0,0,9}}
output: Not a triangular matrix
Level - 2 questions

1. Given an array of balls arrange it such that same color balls are adjacent to one another (in
place) do not use extra space Red color ball-0, blue color ball-1, green color ball-2 (should not
sort the array).
I/p: [0,1,2,0,2,1,1]
o/p: [0,0,1,1,1,2,2]

2. Given the column number of Excel find the column name


I/p : 1
O/p : A

I/p :701
O/p: ZY

I/p : 28
O/p : AB

3. Given an array of numbers find the count of good pairs.


I/p :[1,2,1,3,1]
O/p: 3
explanation (index-0, index-2) , (index-0,index-4),(index-2,index-4)

I/p: [1,1,1,1]
O/p: 6
explanation index- (0,1),(0,2),(0,3),(1,2),(1,3),(2,3)

4. Given a string such that replace letter "G" to "G" and "()" to "O" and "(al)" to "al".
I/p: G()(al)
O/p: Goal

5. Given a string and an integer "k" you can change any k letters in the string and find the
maximum subsequence length in the string.
I/p : "TFTFF" k=2
O/p: 5
Explanation:
Method -1 :can replace both the "T" to "F" and get the new string as "FFFFF" ->
length of the subsequence is 5

Method -2: can change k number of "F" to "T" example changing the first two "F"
to "T" we get "TTTTF" maximum length of the subsequence is 4
LEVEL - 2 QUESTIONS

1. Given an array of integers and the value of k.


I/P: arr= [1,2,0,0] and k=34
O/P: [1,2,3,4]
explanation: 1200+34=1234

I/P: arr=[1,2,3,4] and k=1000


O/P: [2,2,3,4]
explanation: 1234+1000=2234

2. Given a string remove all the adjacent letters that are same.
I/P: s="abbaca"
O/P: ca
explanation:
i). remove bb then the string looks like ->aaca
ii). remove aa -> ca

3. Given the column name from excel find the column number:
I/P: AB -> O/P: 28
I/P: BB -> O/P: 54
I/P: A -> O/P: 1

4. Overlapping subintervals -> https://leetcode.com/problems/merge-intervals/

5. Set Matrix zeros -> https://leetcode.com/problems/set-matrix-zeroes/

6. Given a string and n and direction. Rotate the string 'n' times in the given direction.
I/P: s="zoho corporation", n=4, direction="R"
O/P: tionzoho corpora

I/P: s="hello", n=9, direction="L"


O/P: ohell

Level - 2:

1. Given an array find the product of all the numbers except that index.
I/p : [1,2,3,4]
O/p: [24,12,8,6]

Ip:[4,0,0,2]
Op: [0,0,0,0]

2. Given an array of stones and each stone has a number which is the number of steps you can
make from that stone. Start from the first stone and find whether you can reach the end or not.
Ip: [3,4,1,1,1,2]
Op : true

Ip: [ 2,3,1,0,2,3]
Op: false

3. Overlapping sub intervals: https://leetcode.com/problems/merge-intervals/

4. Given a matrix of size n×n rotate the Matrix 90° clockwise


https://leetcode.com/problems/rotate-image/

5. Given two strings S1 and s2 decrypt the string such that taking one letter from first string and
the next from second string.
Input:
S1: “dcypt te sr”
S2: “er h ting”
Output: decrypt the string
Explanation: split the given string by space.
Word1 (of string1) - dcypt
Word1 (of string 2) - er
DeCrYPT (e and r from word 2) since more number of letters are there in word 1 add it to
the end.

6. Given an array [start, end] of flights and the start point of the flight. Find the path of the flight.
If no path exists return "no path" if path exists return the path. If more than one path exists
return the lexicographically sorted path.
Ip: [ ["DEF","CH"], ["ABC","DEF"], ["CH","XYZ"] ], Start ="ABC"
OP : ["ABC", "DEF", "CH", "XYZ"]

IP: [ [A,B], [C,D,], [H,I] ], Start= “C”


Op : No path ( explanation: from C we can go to D but there is no start point "D")

Ip : [ [A,B], [A,C], [B,C], [C,A] ], Start = “A”


OP: [“A”, “B”, “C”, ”A”, ”C”]
EXPLANATION: There are two paths [A,C,A,B,C] and [A,B,C,A,C] return the sorted
path.
Round - 3:
Assert Management System

Level - 3:
Super Store application

1. Seller can login/signup


Buyer can login/signup
Encrypt the password using any encryption technique.
store and retrieve the buyer and seller details from file.

2. Seller can add items and update their items

3. Buyer can view all the seller details and view their products

4. Buyer - add items to cart and make order.

5. Payment

LEVEL 3 - (A)

A dungeon game.(7 modules)

An adventurer, A monster, A trigger, A treasure, Pits these are the components.


The size and location shall be given. Adventurer must reach treasure fast than monster else he
dies. (given the 2D-grid and the position of the adventurer, monster, trigger, treasure, and pits)

Module -1: Find the minimum number of steps required by the adventurer to reach the
treasure.
Module -2: One monster will be introduced to the grid find if the adventurer can reach the
treasure or not.
Module -3: One trigger will be introduced.
Situation -1: ”Adventurer wins”: The adventurer can reach the trigger and kill the
monster before the monster reaches the treasure.
Situation-2: “Adventurer lost”: The monster reaches the treasure before the adventure
reaches the trigger.
Level 3 - (B)

1. Implement a Linked list and print if loop exists or not.

2. Given a stack of numbers. Sort the stack by pop operation. can use extra space and T.C
should be less than O(n*n).

3. Given a stack (assume the length of the stack is not known) and a target element will be
given. Find whether the given element is present in stack or not.

4. https://www.programiz.com/sql/online-compiler/
Show the customer_id, name and number of orders.

5. Implement any subquery in the given tables.

6. Explain types of join

7. Explain primary key, foreign key....

8. Features of python and Java

9. Explain about Garbage collection and how to manually use garbage collect in java

10. Explain oops concepts

11. Explain inheritance with examples

12. Implement abstract class

13. Explain Promises in js

14. Can foreign key have duplicate values

15. Implement private and protected

LEVEL - 3:

E Commerce application

1. User and admin should login and sign up

2. Admin:
Can view the catalogue
can add new products
Can remove product
can update existing products.

3. There should be categories like


Laptop -> hp, Dell…
Watch ->Fastrack, quartz...

4. User can:
View products
Add product to cart
Make order and get the summary of the order ( each user gets 10% discount for his first
order )
View cart
View history of order
Cancel order ( User can only cancel order after 5 minutes. If user try to cancel after 5mins
display "cannot cancel order")
Remove product from cart

5. User should search the product by product name.

Round - 4 :
1. Design a database for asset management system & Student management
system(marks,courses enrolled)
2. java synchronization
3. threads and multithreading
4. deadLock
5. critical section
6. polymorphism & types
7. javaScript == & ===
8. project explanation
9. query using joins
10. Different types of keys in dbms
11. Indexing in dbms(dense and sparse index)
12. abstract class vs interface in java.
13. what is surrogate key in dbms
14. What is &&
15. what is composite key
16. what the display types in css
17. difference between && and &
18. what is recursionxrrrrrrrrrrrrrrrrrrrrrrrrrrrr
19. what is jquery
Aptitude Questions:

1. If the price of the product is rs. 128 and a gst of 18% is applied to the product then find
the gst in rupees.
2. A man walks from A to B and moves back from B to A. On moving from B to A for each
kilometer he travels he waits for 5 mins. Given that he walks 6 km in 1 hour and the total
time taken by him to complete the round ie., from A to B and B to A he takes 90 minutes.
Find the distance between A and B.

Programming Questions:

Valid parentheses

Level - 4
1. Project explanation

2. General aps ( pipes and cistern and other topics also like find the height, length ...)

3. Given 2 jugs, a 5lit jug and a 3lit jug how can you get 4lit of water.

4. Egg dropping question.


Given 3 eggs and a 10 floors building. Find the floor from where the egg starts to break.
You can only have 3 chances and you should not reuse the egg ( even if the egg is not
broken while dropping).

5. Given 8 balls and a weighing scale. 7 balls are of same weight and one ball has more
weight. You can use the weighing machine only 2 times how will you find the one ball
which has more weight.

6. Why everyone is talking about AI nowadays. Give basic idea of how chatgpt is working.
what is the Latest chatgpt version

Level - 4

1. x^y - y^x = 96154 find the value of x and y

2. Given situation based questions


3. Project explanation and questions from project

4. Why Zoho

You might also like