Dictionary hashing | Intro to CS - Python | Khan Academy

Channel:
Subscribers:
8,970,000
Published on ● Video Link: https://www.youtube.com/watch?v=SOmCvHKmfYI



Duration: 0:00
2,282 views
57


How does the computer store a dictionary in memory? Learn how the computer uses hashing to convert keys to indices. Then, trace how the computer uses that index to locate the item in memory.

View the program used in this video at: https://www.khanacademy.org/python-program/tracing-dictionaries/6604870405701632

Courses on Khan Academy are always 100% free. Start practicing—and saving your progress—now with our Intro to Computer Science - Python course!

Course link: https://www.khanacademy.org/computing/intro-to-python-fundamentals/x5279a44ae0ab15d6:analyzing-data-with-dictionaries
Course playlist:    • Intro to Computer Science - Python | Khan ...  

Khan Academy is a nonprofit organization with the mission of providing a free, world-class education for anyone, anywhere. We offer quizzes, questions, instructional videos, and articles on a range of academic subjects, including math, biology, chemistry, physics, history, economics, finance, grammar, preschool learning, and more. We provide teachers with tools and data so they can help their students develop the skills, habits, and mindsets for success in school and beyond. Khan Academy has been translated into dozens of languages, and 15 million people around the globe learn on Khan Academy every month. As a 501(c)(3) nonprofit organization, we would love your help!

Donate or volunteer today! Donate here: https://www.khanacademy.org/donate?utm_source=youtube

Volunteer here: https://www.khanacademy.org/contribute?utm_source=youtube

TIMESTAMPS:
00:00 : mapping keys to values
00:39 : hash function
01:33 : dictionary definition
02:18 : what if the hash is too big?
02:44 : dictionary access
03:22 : dictionary update
03:45 : handling collisions
04:24 : Python optimizations
05:05 : summary




Other Videos By Khan Academy


2025-06-29Solving division word problems: How many groups? | Khan Academy
2025-06-29Multiplying 3-digit by 2-digit: comparing standard algorithm to partial products | Khan Academy
2025-06-29Multiplying unit fractions: area model to expression | Khan Academy
2025-06-29Solving word problems involving multiplicative comparison | Khan Academy
2025-06-29Finding an unknown angle measure | 4th grade math (Illustrative Math-aligned) | Khan Academy
2025-06-29Composing and decomposing angles | 4th grade math (Illustrative Math-aligned) | Khan Academy
2025-06-29Drawing an area model for the product of two unit fractions | Khan Academy
2025-06-29Rectangles that have the same perimeter | 3rd grade math (Illustrative Math-aligned) | Khan Academy
2025-06-29Division word problems within 100: How many in each group? | Khan Academy
2025-06-29Locating large numbers on a number line | 4th grade math (Illustrative Math-aligned) | Khan Academy
2025-06-26Dictionary hashing | Intro to CS - Python | Khan Academy
2025-06-25Exploration, Identify, Expand | Vocabulary | Khan Academy
2025-06-25Recently, Voyage | Vocabulary | Khan Academy
2025-06-25Orbit, Solar, Immense | Vocabulary | Khan Academy
2025-06-24Realistic, Conflict, Concept | Vocabulary | Khan Academy
2025-06-24Influence, Culture | Vocabulary | Khan Academy
2025-06-24Traditional, Oral, Narrator | Vocabulary | Khan Academy
2025-06-24Survive, Endure, Extreme | Vocabulary | Khan Academy
2025-06-24Strategy, Unfamiliar | Vocabulary | Khan Academy
2025-06-24Competition, Overcome, Achieve | Vocabulary | Khan Academy
2025-06-24Diverse, Similar | Vocabulary | Khan Academy