Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

Essentials: Brian Kernighan on Associative Arrays - Computerphile

August 11, 2017
by
Computerphile
YouTube video player
Essentials: Brian Kernighan on Associative Arrays - Computerphile

TL;DR

This video discusses the concept of associative arrays, also known as hash tables or dictionaries, which offer flexibility in programming by allowing non-integer subscripts.

Transcript

Sean: We are kicking off a bit of a mini-series on things that programmers find essential, and it'd be great to find out what you think is essential. BWK: Sure. Lots of things that are essential. Do you want to narrow the scope of that a little bit? I mean, coffee is essential. Sean: So within programming, I mean, you want to tell us ab... Read More

Key Insights

  • 🚱 Associative arrays, or hash tables, are essential in programming due to their flexibility in using non-integer subscripts.
  • 👣 They are commonly used to keep track of data with custom subscripts, such as groceries or other categorized items.
  • #️⃣ Internally, associative arrays use hashing functions and hash tables to efficiently store and retrieve elements.
  • 💥 Hash collisions, when multiple subscripts map to the same location, are handled using linked lists.
  • 👶 Resizing or expanding associative arrays involves creating a new, larger hash table and rehashing elements.
  • 💦 Many programming languages offer built-in libraries or data structures for working with associative arrays.
  • 😒 By understanding how associative arrays work, programmers can effectively use and implement them in their programs.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What are associative arrays and what is their advantage in programming?

Associative arrays, also called hash tables or dictionaries, are a type of array where subscripts can be arbitrary values. They offer flexibility in programming by allowing custom subscripts like "beer" or "pizza" and their corresponding values.

Q: How are associative arrays implemented internally?

Internally, associative arrays are often implemented using a hash table. A hashing function is used to scramble the subscript value, which determines the location in the hash table. If hash collisions occur, where multiple subscripts map to the same location, linked lists are used to handle the collision and store the elements.

Q: How can associative arrays be resized or expanded?

When an associative array becomes full or crowded, it can be resized or expanded by creating a new, larger hash table. Elements from the old hash table are rehashed and inserted into the new table based on their new hash value. This process helps maintain constant-time access to the array's data.

Q: Are there existing libraries or implementations of associative arrays in different programming languages?

Yes, many programming languages provide libraries or built-in data structures for working with associative arrays. For example, Java has a class called "HashTable," Python has a subscript dictionary, and Perl has a "hash."

Summary & Key Takeaways

  • The video introduces the concept of associative arrays, which have subscripts that can be arbitrary values instead of just integers.

  • Associative arrays provide flexibility in keeping track of data, such as groceries, with custom subscripts like "beer" or "pizza" and their corresponding values.

  • The internal representation of associative arrays involves using a hash table with a hashing function to store and retrieve elements, handling hash collisions through linked lists.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from Computerphile 📚

Transport Layer Security (TLS) - Computerphile thumbnail
Transport Layer Security (TLS) - Computerphile
Computerphile
Error Detection and Flipping the Bits - Computerphile thumbnail
Error Detection and Flipping the Bits - Computerphile
Computerphile
Triple Ref Pointers - Computerphile thumbnail
Triple Ref Pointers - Computerphile
Computerphile
The Problem with Time & Timezones - Computerphile thumbnail
The Problem with Time & Timezones - Computerphile
Computerphile
SLAM Robot Mapping - Computerphile thumbnail
SLAM Robot Mapping - Computerphile
Computerphile
Bit Blit Algorithm (Amiga Blitter Chip) - Computerphile thumbnail
Bit Blit Algorithm (Amiga Blitter Chip) - Computerphile
Computerphile

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.