Zoho Round 3 Question Set
Zoho Round 3 Question Set
1.AC coach
2.Non AC coach
3. Seater
each should contain 60 seats and 10 waiting list max allowed rest request should be
cancelled.
1.Ticket Booking
2.Ticket Cancellation
3.Status Checking
-----------------------------
Here they asked us to create a “Railway reservation system” and gave us 4 modules.
The modules were:
1. Booking
2. Availability checking
3. Cancellation
4. Prepare chart
We were asked to create the modules for representing each data first and to
continue with the implementation phase.
___________________________________
A matrix game was given with 5 rules. We were asked to implement each of the rules
separately.
R3 | - - - |
R2 | - - - |
R1 | - - - |
C1 C2 C3
Each of the 9 cells can either be empty or filled with an atom. R3, R2, R1 are the
rays that originate from the left. C1, C2, C3 are the rays that originate from the
bottom of the box.
Input : Position of the atoms and the rays that gets originated from the outside of
the box.
Eg.) 3
3 1
2 2
1 3
3
R3 C1 C3
H | - - - |
H | X - - |
R | - X - |
R H R
H | - X - |
R2 | - - - | C3
| - - - |
R2 C3
Rule 4:
A ray that has atoms in both of the diagonal adjacent positions should reflect
back.
Input ray: C2
| - - - |
| X - X |
| - - - |
R
Input ray: R2
| - X - |
R | - - - |
| - X - |
Rule 5:
The deflection of rays should happen in the order of the input rays.
H | - - - X |
| - - - - |
| - X - - |
| - - - - |
H
The final task was very confusing and it had to handle all the cases. There are
chances for a ray to end at the starting position if the number of rows and columns
are more than 5.
--------------------------------------
1) Design a Call taxi booking application
-There are n number of taxi’s. For simplicity, assume 4. But it should work for any
number of taxi’s.
-The are 6 points(A,B,C,D,E,F)
-All the points are in a straight line, and each point is 15kms away from the
adjacent points.
-It takes 60 mins to travel from one point to another
-Each taxi charges Rs.100 minimum for the first 5 kilometers and Rs.10 for the
subsequent kilometers.
-For simplicity, time can be entered as absolute time. Eg: 9hrs, 15hrs etc.
-All taxi’s are initially stationed at A.
-When a customer books a Taxi, a free taxi at that point is allocated
-If no free taxi is available at that point, a free taxi at the nearest point is
allocated.
-If two taxi’s are free at the same point, one with lower earning is allocated
-Note that the taxi only charges the customer from the pickup point to the drop
point. Not the distance it travels from an adjacent point to pickup the customer.
-If no taxi is free at that time, booking is rejected
Output 1:
Taxi can be allotted.
Taxi-1 is allotted
Input 2:
Customer ID: 2
Pickup Point: B
Drop Point: D
Pickup Time: 9
Output 1:
Taxi can be allotted.
Taxi-2 is allotted
(Note: Since Taxi-1 would have completed its journey when second booking is done,
so Taxi-2 from nearest point A which is free is allocated)
Input 3:
Customer ID: 3
Pickup Point: B
Drop Point: C
Pickup Time: 12
Output 1:
Taxi can be allotted.
Taxi-1 is allotted
2) Display the Taxi details
Taxi No: Total Earnings:
BookingID CustomerID From To PickupTime DropTime Amount
Output:
Taxi-1 Total Earnings: Rs. 400
1 1 A B 9 10 200
3 3 B C 12 13 200
struct product {
char productname[20];
int product_price;
int product_id;
}
Get the product name, price and id and display the product name and price in
descending of the price.
2) For the same above structure, now add another structure which is the category.
That category will have products in it.
Struct category
{
char category_name[20];
int cat_id;
}
According the category get the product name, product price and id, then display all
the products category wise in descending order.
3) For the same structure which as category and product, get the category id from
the user in the product structure and save to the category list. Then display them
all in category wise.
4) A sheet full of data will be given with inventory stock list, which as different
categories and different products as input with category capacity and product
availability in the structure. Now we need to add a new category or new product
with capacity and availability. Need to check whether the product availability is
exceeding the category capacity, if yes the output rack is full or else tell how
much free space is available and add the product to list.
5) Constraints in the above in question will be given, need to solve all the
constraints, so that the Technical HR gets satisfied.
After these rounds, if they get satisfied, they will call you for Technical HR,
followed by General HR. If you solved every single question and you were really
fast in problem solving, then HR interview will be easy. Or else HR interview will
be very tough especially the Technical HR (The Technical HR round as lots of
logical questions)
-------------------------------------------
Scenario: text editor
Only 40 characters per line and words should be wrapped if they brake
Also perform insert delete operations
_________________________________________________
Q1: Given a matrix dimension find the shortest path between two points.
Q2: shortest path between two points and a monster is present. So we have to avoid
the monster and take a shortest path or die.
Q4: same as Q2 but trigger is present so we can take the trigger to shoot the
monster anywhere in the maze.
Q5: this is the tricky part. There are many holes in between. we should avoid them
and take the shortest path.
=----------------------------------------
We were asked to design a code (its almost a game without any graphics)
the question shall be divided into modules and each shall be verified for 7 to 8
test cases. when first module is done only then u can get the second and important
thing is all the modules are inter related.
Description:
There was one question for each candidate.
1. Add a customer
2. Add an invoice
Application description:
There are ‘n’ number of points in a highway out of which some points collect toll.
Each toll has its own charging scheme according to the vehicles and whether or not
they
are a VIP user.
If they are VIP user, 20% discount apply.
If the vehicle passes 3 toll gates, it has to pay in all the 3 toll gates according
to the
scheme of respective tolls.
There were 4 modules.
1. Given the details of vehicle type, start and destination……display the total toll
paid during
the journey and print the amount after applying the discount.
2. Display the details of all the tolls…..like what are all the vehicles(vehicle
number) passed
that respective toll and the amount each vehicle paid……and the total amount charged
in
that toll.
3. Display the details of all the vehicles …….like what are all the journeys did it
take….the
start and destination of the same……tolls it passed during that journey….amount paid
in
that journey…..and the total amount paid by that vehicle.
4. Assume the highway as a circular path……we have to find the short route and
identify
the tolls between that route and calculate the amount.
After this round , only 7 students survived for the next round.
---------------------------------------------
This was also coding round. They asked us to develop a train reservation system.
Here also each question was continuation to the previous one(better to write code
as function).The task was to write a program to book a ticket, cancel, add to
waitlist…. Some constraints were also given.
-----------------------------------
This was also coding round. They asked us to develop a train reservation system.
Here also each question was continuation to the previous one(better to write code
as function).The task was to write a program to book a ticket, cancel, add to
waitlist…. Some constraints were also given.
---------------------------------------
This is an advanced programming round. The task is to develop an Invoice
Management. The main focus in this round is in designing part. We should mainly
focus on the data base part. How we are going to design the tables to store data
and how we are going manage the data plays an important role. It is better to
refresh DBMS concepts before attending the ZOHO placements. Techtud videos on DBMS
in youtube helped me a lot to understand basic concepts of DBMS. Particularly, in
this round think in the aspect of ER models (Tables, attributes, primary and
foreign key etc).
After designing part they gave us two queries. Here, the coding part should be done
in a very optimal way. Based on the query, from the data we stored, the result
should be printed. I did in C language but better to implement in any OOPS
language.
------------------------------------------
1. Given a MxN matrix filled with ‘-‘ and you need to drop the balloons in the
desired columns starting from the bottom. You need to print the matrix when a new
balloon is dropped.
You need to continue getting inputs until the box is full or until the user chooses
to stop.
TEST CASE :
TEST CASE :
TEST CASE :
The game was split into various stages and we were asked to implement the logic
stage by stage.
----------------------------------------
One coding question is asked.The question is to implement the mail server.They
checked for data structures used to solve the problem, authentication method and
some basic things like logout, send, and login modules
-------------------------------------------
Lift system
There were 8 modules
1. Display the position of Lift
Lift : L1 L2 L3 L4 L5
Floor: 0 0 0 0 0
2. Assign Lift to the users
Input : 2 5
Output : L1 is assigned
Lift : L1 L2 L3 L4 L5
Floor: 5 0 0 0 0
3. Assign nearest lift by comparing their current positions
Assume,
Lift : L1 L2 L3 L4 L5
Floor: 5 2 7 9 0
Input : 4 10
Output :
L1 is assigned
Lift : L1 L2 L3 L4 L5
Floor: 10 2 7 9 0
Explanation : L1 is near to 4 floor
4. If two lifts are nearest to the user’s source floor, the assign the lift with
same direction of user’s requirement.
Example: if user request to move from 4 to 2 ,and if L3 is in 5th floor & L5 is in
3rd floor, then we should assign L3 because user requested for downward motion so
L3 ill move down from 5th floor
5. Restrict L1 & L2 for 0-5th floor , L3 & L4 for 6-10th floor , L5 for 0-10th
Initially all lifts are at 0th floor.
7. Assign capacity (Number of people capable to travel) to all lift and assign
according to the capacity
8. If any lift is under maintenance then their current position should be marked as
“-1” and that lift should not be assigned at any cost.
----------------------------------------------
I was asked to come to next round on the end of round 2 itself. Yet another full
day of coding. In this round i need to implement a game in C, that’s well known as
‘Tetris blocks’. It involves full of matrix operations. I completed nearly around
75% of the game. After this I was asked to implement the Binary Search tree-
insert,search,delete.
--------------------------------------------------
Those who have solved 4 or above problems has shortlisted for 3rd round.It was a
gaming round.
Size of the array is given were w is wall, g ground, o ball, numbers are bricks.
I/p size 7
Number of bricks 6
Ball:5(life)
w w w w w w w
w w
w 1 1 1 w
w 1 1 1 w
w w
w w
w g g o g g w
There are three commands St, lt, rt straight, left, right respectively.
If it is st the ball moves straight .if there any brick(1) along the way it hit
it .then brick disappear.ball back to original position.if there is no brick .it
come to initial position.
I/p st
O/p
w w w w w w w
w w
w 1 1 1 w
w 1 1 w
w w
w w
w g g o g g w
Ball count:5
I/p lt
O/p
w w w w w w w
w w
w 1 1 1 w
w 1 w
w w
w w
w g o g g g w
Ball count:4
(Lt : ball moves diagonally left there is no bricK on the way so it hit the wall
reflect back horizontally there is a brick(3, 2) after hitting it it moves
downwards ball position changed.hence ball count get reduced. On moving downwards
is there any brick that also disappear.)
This is first module.In second module each brick has value for each hit value get
reduced.it disappear only when it become zero.
Those who have clear at least first module.selected for fourth round.
------------------------------------------------
Given an employee date base.
SET a variable
GET a variable
UNSET a variable
COUNT NUMBERS OF VARIABLE with given value
BEGIN — Begins a new transaction
ROLLBACK — Roll back all the commands in the open transaction
COMMIT — Commit the transaction
EXAMPLE 1:
SET a 20
GET a 20
SET b 30
GET b 30
SET a 10
GET a 10
UPDATE c 40 No variable named “c”
SET c 30
COUNT 30 2
COUNT 40 null
UNSET a
GET a null
EXAMPLE 2:
GET a null
SET a 30
GET a 30
EXAMPLE 3:
SET a 30
BEGIN
GET a 30
SET a 40
GET a 40
SET b 40
GET b 40
ROLLBACK
GET b null
GET a 30
EXAMPLE 4:
BEGIN
SET a 40
SET b 40
SET c 50
COUNT 40 2
BEGIN
COUNT 40 null
COMMIT
COUNT 40 2
BEGIN
SET c 10
GET c 10
ROLLBACK
GET c 50
---------------------------------------------------
One application will be given. Time: 2h30m
Write an application for booking railway ticket reservation system. The application
should have four functionalities.
Book
Cancel
Print booked tickets (details with summary)
Print available tickets (details with summary)
Conditions for booking:
There are a total of 63 berths for 63 confirmed tickets, 9 berths for 18 RAC
tickets and 10 tickets in waiting-list. If the waiting-list ticket count goes above
10, print as ‘No tickets available’. The following passenger details should be
obtained from the user.
Name
Age
Gender
Berth Preference
The tickets should not be allocated for children below age 5.But, their details
should be stored. Lower berth should be allocated for persons whose age is above 60
and ladies with children if available. Side-lower berths should be allocated for
RAC passengers.
Print all the tickets that are filled along with the passenger details and at the
end, print the total number of tickets that are filled.
Print all the tickets that are unoccupied and at the end, print the total number of
tickets that are unoccupied.
-----------------------------------------------------
Many students will be able to solve this round. So try to perform best in round 2.
You will be asked to explain before starting.Try to figure out the boundary
testcases .They asked us to implement a gift card system with a existing bank.
The bank has many customers . Each customer can create many gift card. Balance
should detected from bank balance when a gift card is created.A gift card has a id,
pin.You can Top-up any gift card, close gift card and buy item using gift card(they
are called transactions), etc.
The module given to me was Flight Reservation system. There were several modules
where we had to implementation functionalities. Some are mentioned below:
Get input from two flights – 101 and 102 with different passengers for each flight.
After booking seats, display the seat number to the passenger.
The meal has an additional charge which has to be included
Surge pricing was that every ticket (business/ economy) was incremented by a
specific price after each successful booking.
A flight summary has to be displayed.
Cancellation of flights should be done. The refund should be calculated properly.
I used structures and file manipulation for completing the module round.
--------------------------------
The bank has initially three customers.There were around eight modules .
Account Login
Purchase
Account Login
0->1, 1->2
2. TopUp
3.Transaction History
4.Block
5.Logout
Gift card with 5 digit card no and 4 digit pin number will be genrated
2.TopUp
For topup, amount need to be reduced from main account balance and added to gift
card
3.Transaction History
4.Block
5.Logging Out
2.Purchase
Purchase Amount
Then print Available balance
7.Redeem points :
For Every 100 rupee purchase, 1 reward point is added .For 10 reward points, 10
will be added to main account
Input:
Output:
Schedule for Day 1
09:00 AM Welcome event 30 mins
09:30 AM C programming 45 mins
10:15 AM Ruby on Rails programming 60 mins
11:15 AM Rails Debugging 45 mins
12:00 PM LUNCH
01:00 PM Working with Java Beans 30 mins
01:30 PM Introduction to Groovy 60 mins
02:30 PM Tips and tricks in C 30 mins
03:00 PM Back-end development in MySQL 50 mins
03:50 PM Sit down and Take notes lightning
03:55 PM Clojure Introduction 45 mins
04:40 PM Networking Hands-on
I was very much disappointed as I couldn’t solve the question, but I was a bit
satisfied that I have tried my best. Guess what I got one more mail from Zoho after
5 days on November 4, 2019. I was asked to undergo Incubation in Zoho for
performace check and it started on November 6, 2019 and I was put in a team known
as Manage Engine Mobile which is a mobile application development team and I was
asked to learn Kotlin and I’ve been assigned to a mentor. Mentor was very much
helpful and the team was very good and I was learning there nearly a month. After
that a technical interview was conducted by the manager of the same team and he
checked what I’ve learned during incubation and then a formal HR interview was
conducted and finally by god’s grace I was given the offer for the role of android
developer. They checked only whether I was open to learning or not during
incubation.
we can hard code the employee records in any data structure of our choice.
Task 2: Search records based on user give criteria.(this task is divided into two
sub tasks)
b. apply the same for multiple conditions using ‘AND’ for each condition. (similar
to ‘where’ class in SQL using multiple columns).
How the created query engine scales out perfectly even upon adding new features
later?
How do we create a system that can handle the following inputs and process the
input query?
Question:
Write a program to multiply two or more algebraic expressions and print the result.
Examples:
Input: (2x+y)*(3x-5y)
Output: 6x^2-7xy-5y^2
Input: (2xy+4x^2y)*(2x^2y+6xy)
Output: 28x^3y^2+8x^4y^2+12x^2y^2
Input: (2x^2y+3xy^2z-xz^3)*(5xyz+3y^2z-2z)
Output: 10x3y2z+6x2y3z-4x2yz+15x2y3z2+9xy4z2-6xy2z2-5x2yz4-3xy2z4+2xz4
-----------------------------------