Average case O(1) for insert, lookup, and delete thanks to hashing. Worst case O(n) when many keys collide into one bucket (degenerate hashing). A good hash function and load-factor-based resizing keep operations near O(1).
Data Structures· asked at Amazon✓ Added to review
Normalization organizes tables to reduce redundancy and avoid update anomalies, via normal forms (1NF–3NF/BCNF). It improves data integrity but can require more joins; denormalization is sometimes used for read performance.
Databases· asked at Amazon✓ Added to review
JS runs on a single thread with a call stack. Async callbacks go to task queues (macrotasks like setTimeout, microtasks like Promises). The event loop pushes queued callbacks onto the stack only when it is empty, draining all microtasks before the next macrotask.
JavaScript· asked at Amazon✓ Added to review
Generate a unique short code (base62 of an auto-increment ID or a hash) mapping to the long URL in a key-value/relational store. Add caching (Redis) for hot reads, a redirect service returning 301/302, analytics, and consider sharding + a counter service for scale.
System Design· asked at Amazon✓ Added to review
💬
Send Feedback / Bug
Feedback Submitted!
Thank you. Your help keeps Geeky Script running smoothly.