Start Data Structures with Python

Start your Data Structure journey here with Python

To master Data Structures is the key to understand many algorithmic problems and solve advanced challenges.

Data Structures is about how to keep data inside your computer. This has impact on the performance of your programs and sets the boundaries on how big instances you can solve with your program.

If you are serious about starting with Data Structures you should consider my online course on the subject.

Step 1: The Queue data structure

A Queue is one of the most fundamental data structures and it takes a few steps to understand why it is important.

Most people undervalue the depth of what a Queue does and how easy it is to make mistakes and use wrong data structures to solve a problem for a Queue.

But first, let’s try to understand a Queue in Python. The tutorial has a video walking you through it all.

Step 2: Understand why you cannot use a Python list as a Queue

The best way to learn things in programming is to make mistakes.

If that is not a quote, then we should make it a quote. Unfortunately, I do not think I can take the honor for that quote.

Anyhow, why am I so excited about that?

When you learn to do something the right way, you often do not know why it matters. But if you do something the wrong way and pay the high price for it, then you will remember it forever.

In the next one we will learn that you cannot use a Python list in place of a Queue.

Step 3: Case study of how to measure performance

Now you see how big impact the right data structure has.

This next tutorial shows the case study on how the you can measure the performance.

Step 4: A Stack – the next data structure you should master

Now you understand the importance of a Queue, the next thing you should master is the Stack.

In the next tutorial we introduce a Stack and implement it in Python. There is a video to support you in the process.

Step 5: Check the performance of a Stack.

The next one also implements a Stack but measures the performance of it.

Step 6: Understand how small differences can have huge impact

A Python list can work as a Stack and have the same amortized run-time.

If you do it in the wrong way, you will be punished by it. Or more correctly, you programs performance will slow down more than you think.

Again, this is important to try these mistakes out. They teach you how important it is to make the right choices when it comes to data structures.

Step 7: Solve a Maze with a Stack

Now this is fun. You know how to solve a maze?

Yes, you walk around and try not to make the same choices again if you come back to a place you have been before. Actually, solving a maze on a computer is straight forward. Computers are really good to keep track of what choices it has made so far.

Let’s try to make a Maze solver with a Stack.

Step 8: Find the nearest smallest element

This is one of the classical problems, which are very popular to solve in programming challenges.

This is because the naive solution (the first solution most think of) is far from optimal.

Learn the problem and see how to solve it.

The tutorial has two videos to walk you through it.

Step 9: Balancing bracket problem – another classical problem you want to master

The balancing bracket problem is another problem you want to master.

Again it is very popular because the naive solution is far from optimal.

The tutorial has a video explaining it all.

Step 10: Linked List – get an introduction to them

This will show you one of the most amazing data structures.

It is different from what you know from real life. A Stack and Queue is similar to concepts you know from real life. A linked list is somewhat different.

The beauty of a linked list is that you can use it as the underlying data structure for a Queue and Stack.

Check out an introduction here.

Step 11: Create a randomized heap

A heap is another data structure you will run into along the way of your programming journey.

It can be implemented in many ways and have many characteristics and performance profiles.

In this one we will do it with a binary tree.

Next steps

This is just the start. A natural next step is enroll in my course to get an in depth explanation of all the concepts and learn a lot more about data structures.

%d bloggers like this: