SproutStackSproutStack home

Hashing (Two Sum)

Remember complements as you go.

Teaching this in the lesson? Read the chapter.

Step 1 of 3

1. need = t−x

For x, who completes the pair?

  1. need = target − x

Prefer prose? Every animation has a matching chapter, listed above. Diagrams use text labels, so they read aloud with the listen button on the lesson page.