Meesho Coding Sample Question
Summary
I completed a coding sample for Meesho which involved designing an Online Learning Platform, focusing on course enrollment, scholarship application with validation, and managing course seat capacity. The challenge also included handling concurrent scholarship usage and implementing basic test cases.
Full Experience
Online Learning Platform – Course Enrollment System
Core Requirements
- View all available courses and their enrollment fees.
- Add courses to an enrollment session:
- If
enrollment_idexists, use it. - Otherwise, create a new enrollment session for that
enrollment_id.
- If
- Scholarship vouchers:
- Percentage-based scholarships must have a maximum discount cap.
- Can be applied to an enrollment session.
- Must be validated for:
- Expiry date
- Minimum total enrollment fee eligibility.
- System calculates final payable amount after scholarship application.
- Enrollment can be completed with the discounted amount.
- Course seat capacity must be maintained and updated upon successful enrollment.
Bonus Features
- View student enrollment history (requires a
Studententity). - Handle concurrent scholarship usage:
- Limited-quantity scholarships.
- Prevent race conditions when multiple students attempt to use the same limited scholarship.
Expected Deliverables
- Working implementation with proper class structure.
- Basic test cases covering main scenarios.
- Proper error handling.
- Clean and maintainable code.
- Use in-memory data structures instead of an actual database.
- Follow object-oriented design principles.
- Handle edge cases.
Interview Questions (1)
Online Learning Platform – Course Enrollment System
Online Learning Platform – Course Enrollment System
Core Requirements
- View all available courses and their enrollment fees.
- Add courses to an enrollment session:
- If
enrollment_idexists, use it. - Otherwise, create a new enrollment session for that
enrollment_id.
- If
- Scholarship vouchers:
- Percentage-based scholarships must have a maximum discount cap.
- Can be applied to an enrollment session.
- Must be validated for:
- Expiry date
- Minimum total enrollment fee eligibility.
- System calculates final payable amount after scholarship application.
- Enrollment can be completed with the discounted amount.
- Course seat capacity must be maintained and updated upon successful enrollment.
Bonus Features
- View student enrollment history (requires a
Studententity). - Handle concurrent scholarship usage:
- Limited-quantity scholarships.
- Prevent race conditions when multiple students attempt to use the same limited scholarship.
Expected Deliverables
- Working implementation with proper class structure.
- Basic test cases covering main scenarios.
- Proper error handling.
- Clean and maintainable code.
- Use in-memory data structures instead of an actual database.
- Follow object-oriented design principles.
- Handle edge cases.