Phonepe | SDE 1[1-3] | Bangalore | April 2024 [Rejected]
Round 1 : Machine Coding
PhonePe Mini Wallet
Design a prepaid mini wallet for PhonePe through which users can send and receive money among themselves and can win exciting offers. The user can load money into the wallet via. various sources like CC, DC, UPI, etc, and perform easy transactions.
Requirements
- Users need to register on PhonePe to use this wallet.
- The minimum amount of transaction will be always greater the 0.
- The user must have a sufficient balance in his wallet while doing the transaction.
- The user can fetch their wallet balance.
- The user can sort transactions history (eg. based on date, amount, etc)
- The user can filter transactions history (eg. based on user etc)
- The transactions will be eligible for exciting offers if they meet their respective criteria.
Capabilities
Below are various functions that should be supported with the necessary parameters passed.
These are just suggestions, the signatures can be altered as long as the functionalities are provided.
registerUser - register user to use wallet
topUpWallet() - add money to the wallet
fetchBalance() - fetch balance available in the wallet
sendMoney() - send money to the user, all the eligible offers will be applicabie for transaction
get Transactions(filter, sorter) - fetches transactions history based on filter and sorting criteria.
Offers
Following are example offers supported by the wallet
- The first transaction amounting greater than 100 will be eligible for 10% cashback
- If the wallet balance of both the sender and receiver becomes equal after the transaction
Guidelines
- You should store the data in memory using a language-specific data structure.
- Implement clear separation between your data layers and service layers.
- Simple and basic functions are expected as entry point - no marks for providing fancy restful API or framework implementation
- Because this is a machine coding round, heavy focus would be given on data modeling, code quality etc, candidate should not focus too much time on algo which compromises with implementation time
Expectations:
- Your code should cover all the mandatory functionalities explained above.
- The code should be extendable and scalable to incorporate future extensions.
- Your code should be executable and clean.
- Your code should be properly refactored, and exceptions should be gracefully handled.
- Appropriate errors should be displayed on the console
- Code should be extendaple to support multiple offers, fiters and sorters
How will you be evaluated?
- Code Should be working
- Code readability and testability
- Separation Of Concerns
- Abstraction
- Object-Oriented concepts
- Exception handling
- Language proficiency.
- Scalability
- Test Coverage (Bonus Points)
- [execution time limit) 4 seconds (sh)
- [memory limit) 1 GB
Verdict : Shortlisted for next round as I have implemented design pattern in such a way that the code is scalable.Also, I have implemented the bonus question(offer) in my code too.
Round 2 : PS DS round
Question 1 : https://leetcode.com/problems/house-robber-iii/description/
Question 2 : Close enough to the question of Leetcode: https://leetcode.com/problems/rotting-oranges/description/
Verdict : Shortlisted for next round as I'm able to solve both the questions with dry run in the given time frame.
Round 3 : HM round
HM deep dive into my projects and challenging work I have done in my organization using behavioral questions. Discussion goes for 1 Hour.
Final verdict: Firstly, HR call me and told that I'm rejected because my HLD round is not upto mark with HM, but when I told her that there is no HLD round with HM, Only behavioral discussion are there. Then, HR told me that I haven't implemented factory design in my machine code round which I have already implemented in my code. Then I have shared the screenshot of code to HR where I have implemented the factory design and requested her for code re-evaluation. After that, there is a final call from different HR from phonepe that panel have decided that they are not moving forward with my candidature.Every rounds are the elemination round but after final round they are giving the reason of rejection is 1st round.


