Walmart Global tech India IN4 [Reject]
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2021-10-02Added By Anonymous
Source: Link
Got a call from recruiter setting up a Java drive entire day.
YOE: 7
1.Machine Coding Round
1Taxi Booking System: Implement an online taxi booking system for a customer where the customer can select a category to book based on his pickup location and drop location.
2
3Constraints:
41. Various categories of taxi will be available like mini, sedan, suv, share, outstation
52. Each vehicle is tied to an agency to which it belongs.
63. Assume a method exists getDistanceTime (Point a, Point b) which return distance and time taken to travel from a Point A to point B, where Point refers to a model representing the location in terms of latitude and longitude.
74. Fare is a factor of city specific fare, distance, time and number of active users in the system. Fare increases as demand increases with a factor of 0.1 * total users requested rides/total inventories when the demand crosses the supply else the fare remains same.
85. Active users refer to the users who are trying to book a cab at that time. Dormant users are those who have not created any booking in last 1 week.
96. Commission is based on the category selected. Some categories have high commission like suv, luxury, outstation while others can have lower commission
10
11APIs to Implement:
121. Find the estimated fare for a booking from point a to point b based on category selected
132. Find number of vehicles available and occupied based on category provided at any given point in time
143. Total number of bookings based on category given in the date time range supplied
154. No of active and dormant users within a date time range. Active users refer to the users who are trying to book a cab at that time. Dormant users are those who have not created any booking in last 1 week.
165. Agency wise total revenue generated for a given date range
176. Total booking of an agency based on category supplied.
18
19Guidelines:
20o Define a detailed object model for entities required by system
21o Make proper use of Inheritance, Abstraction and interfaces
22o Expect to do proper exception handling of code
23o Have proper commenting in code and should follow best coding practises
24o Use design patterns like Builder, Factory, Visitor etc wherever applicable
25o Justify his/her coding choices i.e. why did he/she choose to define a separate function for a
26feature or why did he/she not define constructor for initialising class
27o Define Enums, Singleton classes where applicable
28o Separation of concern is addressed
29o Implement unit test cases for key sections of his/her code
30o Use Java 8/7 features like functional interfaces, Auto Closeable resources etc. 1.DS/Algo
1Minimum Moves Knight(LC medium): Discussed approach and coded in short time. Discussed test cases edge cases and complexities.
2
3Later asked a follow up about printing the path.Discussed the approach which was correct but code didn't work properly. Even though the interviewer seemed satisfied was ghosted by recruiter that day..Next day called from another number (LOL) and got feedback that feedback is negative. No point asking detail feedback to these.I have a long huge list of rejects and few accepts till now. Will post it later on and try to give back to the community.