This repo has an example coding challenge (mentioned below) and solution for the same. The idea is to demonstrate expectation from the solution that we have when potential candidates go thorugh coding round as part of our hiring process.
Chinmaya Mission Hospitals are often revered as the best hospitals for the poor and middle class house holders. With a new set of funds coming in, the CEO of chinmaya mission hospitals has decided to open new branches in various parts of karnataka. However he doesn't have any data to target places that could be most beneficial to people. He has reached out to us to design an application that can record patients location. He wants to understand, on a given day or for a range ofdays, how many OP's are within Bangalore and how many are from outside. Based on this, he will make a decision if it is feasible to open new branches outside of Bangalore or open new centers within Bangalore itself?
Please design a program using oops concept that can record the percentage of local patients vs outstation patients?
Eg: From last 3 days 100 OP registrations took place of which 80% are from Bangalore and 20% are outstation.
Expectations:
- Build the solution with OOP concepts
- Find out the relations between the Hospital, Patient
- Use viable data structures to handle at least 1000 patients per hospitalSuggested
Input:
- Patient 1: Name: Abc Place: Bangalore Age: 42,
- Patient 2: Name: Def Place: Delhi Age: 23
- Patient 3: Name: Ghi Place: Hyderabad Age: 34
Suggested Output:
- Local Patients: 1
- Outstation Patients: 2