Low Level Design (LLD) Coding

WhatsAppYouTube
Buy Course

Low Level Design (LLD) Coding

Design (LLD) Online Voting System  - Machine Coding

Design (LLD) Online Voting System - Machine Coding

Subhahu Jain's photo
Subhahu Jain
·Oct 23, 2022·

9 min read

Table of contents

  • Code
  • ⚠️ Issues in Above Design
  • 1️⃣ Vote Casting Is NOT Atomic (Critical Integrity Violation)
    • Problem
    • LLD Issue
    • Concurrency Issue
    • Result
    • Interview Keyword 🚨
    • Solution
  • 2️⃣ hasVoted Flag Is Unsafe
    • Problem
    • Concurrency Issue
    • Result
    • Interview Expectation
    • Solution
  • 3️⃣ Votes Are Stored in Memory (Fatal Design Flaw)
    • Problem
    • LLD Issue
    • Concurrency Issue
    • Interview Verdict ❌
    • Solution
  • 4️⃣ Voter Identity Is Directly Linked to Vote (Privacy Violation)
    • Problem
    • LLD Issue
    • Security & Privacy Issue
    • Interview Expectation
    • Solution
  • 5️⃣ Password Handling Is Insecure
    • Problem
    • LLD Issue
    • Concurrency + Security Risk
    • Interview Red Flag 🚨
    • Solution
  • 6️⃣ HashMap & ArrayList Are Unsafe
    • Problem
    • Concurrency Issue
    • Real-World Scenario
    • Interview Expectation
    • Solution
  • 7️⃣ Observer Pattern Is Blocking & Dangerous
    • Problem
    • LLD Issue
    • Concurrency Risk
    • Interview Keyword
    • Solution
  • 8️⃣ Encryption Strategy Is Fake Encryption
    • Problem
    • LLD Issue
    • Security Issue
    • Interview Expectation
    • Solution
  • 9️⃣ No Idempotency Protection
    • Problem
    • Concurrency Issue
    • Interview Insight
    • Solution
  • 🔟 No Audit Log / Verifiability
    • Missing Entirely
    • LLD Issue
    • Interview Verdict
    • Solution
JavaScriptPythonGeneral ProgrammingProgramming Blogs

©2026 Low Level Design (LLD) Coding

Publish with Hashnode

Powered by Hashnode - Home for tech writers and readers