Hash Tables: How Hashing Gives O(1) Lookups
How a hash table turns a key into an array index, what happens when two keys collide, why the table resizes itself, and how to use JavaScript’s Map and Set to solve real problems in O(1) time.
Tech lead and full-stack engineer, Bengaluru
I lead full-stack delivery for hospitality and SaaS products, from system architecture and API design to UI, third-party integrations and production deployment, across web, mobile and desktop.
How a hash table turns a key into an array index, what happens when two keys collide, why the table resizes itself, and how to use JavaScript’s Map and Set to solve real problems in O(1) time.
Learn tree terminology, binary trees and binary search trees, how to insert and search in a BST, and the four ways to traverse a tree, with JavaScript code.
Understand stacks (LIFO) and queues (FIFO), implement both in JavaScript, and solve classic problems like balanced brackets and breadth-first processing.
Learn how linked lists work, how they compare to arrays, and how to build singly and doubly linked lists in JavaScript with insert, delete, search and reverse.
Run code before a request reaches your Next.js pages: protect routes, redirect and rewrite URLs, set headers and cookies, and limit middleware to the paths you need.