📊 Hash Table (Size = 10)
🎯 Why Hash Table?
Problem: Prevent duplicate voting efficiently
❌ Array
O(n)
Check all voters
✅ Hash Table
O(1)
Direct check
How it works:
1️⃣ Name → Hash Function → Index
2️⃣ Search entire table for duplicate
3️⃣ If not found → Store at calculated index
4️⃣ If found → Reject duplicate