[BE] - Nguyen Chi Thuc#293
Open
chithuchcmus wants to merge 2 commits into
Open
Conversation
added 2 commits
July 5, 2026 11:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds solutions for three coding challenge problems, covering algorithmic implementation, REST API development, and system design.
Problem 4: Sum to N (TypeScript)
Three unique implementations of a
sum_to_nfunction that computes the summation from 1 to n for any integer input.Problem 5: Product CRUD REST API
A production-ready RESTful API for managing products, built with Express.js, TypeScript, and PostgreSQL.
Features:
IProductService,IProductRepository)API Endpoints:
POST /v1/products— Create productGET /v1/products— List with filters (category, price range, search, pagination)GET /v1/products/:id— Get by IDPATCH /v1/products/:id— Partial updateDELETE /v1/products/:id— Soft deleteTesting: Unit tests (service layer with mocked repo) + integration tests (controller layer with Supertest)
Problem 6: Real-Time Leaderboard System Design
A comprehensive system design document for a real-time leaderboard service supporting 1M MAU, 10K TPS, and sub-100ms query latency.
Documents included:
SYSTEM_DESIGN.md— Complete architecture, data models, API specs, and design decisionsSEQUENCES.md— 7 Mermaid sequence diagrams for key flowsSERVICES.md— Microservices overview and scaling strategyArchitecture (3 microservices):
Key design decisions:
Future optimizations documented: Event batching, priority-based tiers, distributed tracing, graceful degradation