I am a Software Engineer with 2+ yr of experience. I had an off-campus round of Zoho. I got rejected in the third round of object-oriented design.
Level 1: The level consists of 10 programming questions and 10 aptitude questions.
1. What is the output?
2. What is the output?
3. What is the output?
4. What is the output?
5. What is the output?
6. What is the output?
7. What is the output?
8. What is the output?
9. What is the output?
10. What is the output?
Section 2 consists of 10 questions
- The price of 2 apples and 4 oranges is Rs 160. With the same money, one can buy 1 apple and 6 oranges. What is the price of 3 oranges?
- Anirudh wants to cut a large rectangular board into small identical square pieces. If the board size is 18 inches by 30 inches. What is the least number of square pieces he can cut without wasting any of the board?
- At a party, every person shakes hands with every other person. If there are 105 handshakes, find the number of people at the party.
- A started a business with the amount of Rs. 40000. After 5 months A withdraws Rs 20000. B invest every monthly regularly. The ratio of profit share between A and B at the end of the year is 10239. Find how much B invested in each month?
- the difference between a two-digit number and the number obtained by interchanging the position of its digits is 18. What is the difference between the two digits of the number?
- The price of 2 apples and 4 oranges is Rs. 160. With the same money, one can buy 1 apple and 6 oranges. What is the price of 3 oranges?
- A class has 6 boys and 7 girls. out of them, they have to select a group of 6 students for performing a mime, so that the selected group should have at least 4 girls.
- If everyone in a group contributed for fundraising and each paid at least Rs. 140 and the total amount collected is 2370, which could be the maximum possible strength of that group.
- Find the unit’s digit in the product 24647^117 and 45639^118.
- If A(x) denotes the number of prime numbers not greater than x. then what is the value of A(A(100)).
You have to score 100% to clear this L1 level of the Zoho round. I got selected in this round and within a few days got a call from HR regarding the L2 level of the Zoho round.
L2 level of Zoho round involves DataStructure and Algorithms round.
1. Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string.
Input : strs = ["flower","flow","flight"] output : "fl"
Input : strs = ["dog","racecar","car"] output : ""
2. A tree goes through two growth cycles every year, Summer and Spring. Every spring, it doubles in height. Every summer, its height is increased by the meter. Given a sampling, that is planted at a height of 1 meter during Spring. Calculate the height after n cycles.
Input : 0 Output:1
Input: 1 Output 2
Input 4 Output:7
3. You are given an array of prices where prices[i] is the price of a given stock on an ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0
Input : prices =[7,1,5,3,6,4] output: 5
Explanation: Buy on day 2 (price=1) and sell on day 5(price=6), profit = 6-1 = 5
Note that buying on day 2 and selling on day 1 is not allowed because you must buy before you sell.
input : prices = [7,6,4,3,1] output : 0
Explanation: In this case, no transactions are done and the max profit =0
something similar to this article: https://www.geeksforgeeks.org/stock-buy-sell/
L3 level round: L3 is an object-oriented design round. I was rejected in this round, try to complete all the tasks in 3 hrs, otherwise, you won’t be shortlisted.
Create a Bus booking application, ZOBUS, which satisfies the following conditions:
Task 1: initialization
Initialize the data as per the details are given below to be loaded when the program starts:
it can be loaded and kept in the memory. No need to maintain a File or DB.
Assume that this bus is available only for a single route (Chennai to Bengaluru).
And that all the passengers want to travel on the same day.
One customer can book only 1 ticket.
2 Sleeper buses – 1 AC and 1 Non-AC
2 Seater Buses – 1 AC and 1 Non-AC.
Seater Bus Has 12 Seats (1,2 3, 4 -represent row where people can seat. middle space is left because it’s walking area).
Sleeper Bus has 12 Seats in 2 Decks(6 each)
Task 2: Customer Sign-up: The customer should have an option to sign up using a new account by providing all the basic details.
Task 3: Customer Login: The customer should be able to log in using their existing account credentials (Username and password)
Task 4: Booking a Ticket
4.1 Bus options
The customer should be asked for the number of passengers We should display all the buses with the remaining capacity.
Sample Output :
- AC Sleeper – 12 Seats
- AC Seater – 9 Seats
- Non AC Sleeper – 4 Seats
- Non AC Seater – 10 Seats
4.2 Seat Selection: Once the required bus is chosen by the customer, h should be shown the current status of the bus in which seats are occupied and which ones are vacant.
And the customer can choose his seats based on the following rules :
- He /She should enter the number of travelers not greater than the remaining seats). Should get the name and gender of co-travelers.
- He /She can choose the seats such that only a lady can occupy the seat beside a lady from the different ticket.
- A lady and gent may occupy adjacent seats if they are from the same ticket.
If B2 is a lady, then seat B1 can be occupied only by another lady. Similar to the sleeper. Whereas if 2 people are traveling. 1 Male and 1 Female. They can take seats A1 and A2.
Task 5: Fare calculation: The fare should be calculated and intimated to the customer based as follows :
- AC + Sleeper – Rs 700 / seat
- AC + Seater – Rs 550 / seat
- Non-AC + Sleeper – Rs 600/seat
- Non-AC + Seater – Rs 450/seat
Task 6: Ticket confirmation: Once the fare is estimated, the customer must be prompted for the confirmation of the booking. Only if he confirms, the ticket should be booked.
Task 7 Ticket Cancellation: The customer should be given an option to cancel their ticket based on the following workflow:
- He should show the list of seats booked by him.
- He can have the option to completely cancel(all seats) or partially cancel (selected seats)
- Cancellation Fee of 50% for AC and 25% for Non-AC seats.
Task 8: Bus Filtering: The customer can filter and view the buses based on his preference among the following :
- AC or Non-Ac or Both
- Seater or Sleeper or Both
Only applicable buses which are not filled should be shown.
- In the descending order of remaining capacity.
- If the same capacity AC should come first.
- If the same capacity Sleeper should come first.
Sample Output :
- AC Seater – 12 Seats
- AC Sleeper – 11 seats
- Non-AC Sleeper – 11 seats
- Non-AC Seater – 11 seats
Task 9: Bus summary: The admin should be able to see the summary of the buses as follows :
Bus Type, Number of seats filled, Total Fare Collected, and details of each filled seat.
Sample Output :
- AC Sleeper
- Number of Seats Filled: 4
Total Fare Collected : 3510 (4 seats+ 1 cancellation)
I got rejected after this round, though I tried my best, maybe I was not that good. Better Luck Next time.