Data Structures & Algorithms for humans

Learning should ALWAYS be fun!! :)

Binary Tree Data Structure, Source: https://visualgo.net/

This article can be used as an overview by beginners in Computer Science and aims to:

Define Algorithm Define Data Structures Provide ways to understand and demystify the code filled with pointers. (Bonus)

Note: This article may be updated if new relevant and fun resources are found. You may also comment some awesome resources, i’ll update.

So what’s an algorithm, anyway?

Simply put, an algorithm is a series of steps/rules, which you follow in order to achieve some goal, or to produce some output.

Consider an example of withdrawing money from ATM. Wait, does that count as an algorithm? Yes it does!

def withdrawMoney (PIN,AMOUNT):

Go to ATM

Insert your ATM card and swipe out

Enter your PIN

Select "Withdrawal" option

Select "Savings Account"

Enter AMOUNT

Collect cash

Implementation: Each algorithm can be implemented in various programming languages(like C, JAVA, Python) using the constructs offered by the language.

(You basically tell computer to follow particular set of steps using any of the languages it understands)

Efficiency of an algorithm is depicted in terms of Time-complexity(order of time it takes) and Space Complexity(order of space it consumes) using notations, such as, Big-O Notation, Omega(Ω) Notation, Theta(Θ) Notation.

Okay, but what are Data Structures?

Data “structures”, as name suggests, are structures of data, the way you organize data in computers so that it can be used efficiently.

That’s it? It was easy, wasn’t it? But what do we use them at all.

Using data structures we tend to organize data in such a way it mirrors real life organization as closely as possible Or how they are going to be used in code later. The decision lies closer to optimized usage though.

For example, “Tree” data structure can be used to depict “Employees in a company”, “Organization of folders in a computer” etc. ( Use cases that present hierarchy of some kind ) in an optimal way.

Some data structures: Linked Lists, Trees, Graphs, Hash Tables etc.

Linked List Data Structure, Source: https://visualgo.net/

Cool, I got it all! I will rock in Computer Science! Where’s my bonus?

BONUS: You may use this website to visualize data structures and some algorithms to understand what is going under the hood.

So, what all you learnt?

What is an algorithm? What are data structures and why are they used? How to measure efficiency of an algorithm?

++ A bonus website to make learning fun.