Backend Engineer Take-Home Solutions (Problems 4–6): Go Algorithms, Express API, and Scoreboard System Design#292
Open
linhtutkyawdev wants to merge 15 commits into
Open
Backend Engineer Take-Home Solutions (Problems 4–6): Go Algorithms, Express API, and Scoreboard System Design#292linhtutkyawdev wants to merge 15 commits into
linhtutkyawdev wants to merge 15 commits into
Conversation
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.
This PR contains complete solutions for the backend engineering assessment, covering:
Each solution focuses on different aspects of backend engineering: algorithms, API design, persistence, and distributed system thinking.
1. Problem 4 – Sum to N (Golang)
Three distinct approaches are implemented to compute
1..nsum:Implementations
Solution A – Gauss Formula
n(n+1)/2Solution B – Iterative Loop
1..nSolution C – Parallel Divide & Conquer
Notes
2. Problem 5 – Task Management API (Express + TypeScript + SQLite)
A fully functional CRUD backend with persistence and relational structure.
Core Features
Architecture
Database Design
tasks– core task datatags– reusable tagstask_tags– many-to-many mappingtask_events– lifecycle audit logNotes
3. Problem 6 – Scoreboard Service Design (Live Leaderboard System)
A backend design for a real-time Top 10 scoreboard with secure score updates.
System Overview
Architecture
Score Update Flow
Client performs action
Signed request sent (HMAC-based)
Backend validates:
Score update:
Event broadcast via WebSocket
Security Model
Leaderboard Strategy
Redis Sorted Set used for performance:
ZINCRBY leaderboard <score> <userId>ZREVRANGE leaderboard 0 9 WITHSCORESProvides:
Real-Time Updates
Added Artifacts
README.mdfor Problem 4 (Go implementations + benchmarks)README.mdfor Task API (Problem 5)README.mdfor Scoreboard design (Problem 6)API_SPECIFICATION.md(bonus design detail)PROJECT_PLAN.md(bonus planning breakdown)