Software Development Engineer 2
Design and Implement Buy Now Pay Later (BNPL)
Design and implement a Buy Now Pay Later (BNPL) system for Flipkart. The solution should be purely in-memory (no database required) and runnable/demonstrable via a driver/main program. Required capabilities: - **seed_inventory and view_inventory**: Load products (name, count, price) and display current inventory stock. - **register_user**: Register a user with an assigned initial BNPL credit limit. - **buy(user, items, payment_method, date)**: Support payment methods `PREPAID` or `BNPL`. Prevent BNPL transactions once credit limits are exhausted. - **clear_dues(user, orderIds, date)**: Support partial or full clearance of pending balances mapped to specific orders. - **view_dues(user, date)**: Display pending dues prior to the provided date, sorted by purchase date, marked as `PENDING` or `DELAYED` (if older than 30 days). - **order_status(user)**: Output complete order history along with remaining BNPL credit limit. - **Bonus**: Implement logic to blacklist users defaulting on 3 or more orders, alongside dynamic `add_inventory` and `remove_inventory` functionality.
This question was asked in
Flipkart Software Development Engineer 2 Interview Experience
The Flipkart interview process comprised five rigorous rounds spanning an Online Assessment, on-site Machine Coding, Low-Level Design review, Data Structures & Algorithms, and a System Design combined with a Hiring Manager round. Across these rounds, the evaluation covered algorithmic problem solving including Trie and Graph topics, an end-to-end in-memory Buy Now Pay Later design, deep dive into microservices patterns, and behavioral competencies. The overall difficulty was medium to hard, reflecting a thorough assessment of practical coding, design architecture, and problem-solving skills.