AITeky Learn

AiTeky Original Interactive Learning & Practice Intermediate

Data structures and algorithms: choosing by what you need to do

See that no structure is best at everything, how a hash table finds things quickly and why it slows when it fills up, and choose the right structure for a stream of data by counting the work each one does.

A data structure is a way of arranging data so that certain questions are cheap to answer: "is this item here?", "what is the smallest?", "what comes next?". An algorithm is a step-by-step method. The two go together, and choosing well rarely means knowing a clever trick: it means listing the operations you need and counting what each structure charges for them.

This course models structures with small Python programs that count the work they do, which you can run in your browser. The counts, not the clock, are what matter, and they apply in every language. All numbers here are made up.

  • Learn lessons explain one idea at a time and let you run it.
  • Industry ready lessons decide and justify, and end with interview questions.

Basic Python helps. (For algorithm design in the context of machine learning, see the algorithms and data structures course in the AI and data science library.)

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 30 min Free sample 🔒 AiTeky Pass No structure wins everything Count the steps that an unsorted list, a sorted list, a hash table and a heap need for four jobs (is it here, insert, find the smallest, list a range), and see that each is cheap at some jobs and costly at others, so the right choice depends on which jobs you do most.
  2. 02 30 min 🔒 AiTeky Pass How a hash table finds things Build a small hash table with chaining, watch two keys land in the same slot, measure how the average number of steps grows as the table fills up, and see why real tables resize before they get crowded.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 03 35 min 🔒 AiTeky Pass On the job: the top ten from a stream A news site wants a live "most-read now" list from a stream of page views. Compare three approaches (sort all the counts for every refresh, keep a small heap of the best ten, count in a hash table and read only the changed ones) by counted work on a simulated stream, choose one, and write the design note.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in