# Data Structures Easy to Advanced Course – Full Tutorial from a Google Engineer

Data Structures Easy to Advanced Course – Full Tutorial from a Google Engineer

Learn and master the most common data structures in this full course from Google engineer William Fiset. This course teaches data structures to beginners using high quality animations to represent the data structures visually.

You will learn how to code various data structures together with simple to follow step-by-step instructions. Every data structure presented will be accompanied by some working source code (in Java) to solidify your understanding.

💻 Code: https://github.com/williamfiset/data-structures

🎥 Course created by William Fiset. Check out his YouTube channel: https://www.youtube.com/channel/UCD8yeTczadqdARzQUp29PJw

⭐️ Course Contents ⭐️

⌨️ (0:00:00) Abstract data types

⌨️ (0:04:28) Introduction to Big-O

⌨️ (0:17:00) Dynamic and Static Arrays

⌨️ (0:27:40) Dynamic Array Code

⌨️ (0:35:03) Linked Lists Introduction

⌨️ (0:49:16) Doubly Linked List Code

⌨️ (0:58:26) Stack Introduction

⌨️ (1:09:40) Stack Implementation

⌨️ (1:12:49) Stack Code

⌨️ (1:15:58) Queue Introduction

⌨️ (1:22:03) Queue Implementation

⌨️ (1:27:26) Queue Code

⌨️ (1:31:32) Priority Queue Introduction

⌨️ (1:44:16) Priority Queue Min Heaps and Max Heaps

⌨️ (1:49:55) Priority Queue Inserting Elements

⌨️ (1:59:27) Priority Queue Removing Elements

⌨️ (2:13:00) Priority Queue Code

⌨️ (2:28:26) Union Find Introduction

⌨️ (2:33:57) Union Find Kruskal’s Algorithm

⌨️ (2:40:04) Union Find – Union and Find Operations

⌨️ (2:50:30) Union Find Path Compression

⌨️ (2:56:37) Union Find Code

⌨️ (3:03:54) Binary Search Tree Introduction

⌨️ (3:15:57) Binary Search Tree Insertion

⌨️ (3:21:20) Binary Search Tree Removal

⌨️ (3:34:47) Binary Search Tree Traversals

⌨️ (3:46:17) Binary Search Tree Code

⌨️ (3:59:26) Hash table hash function

⌨️ (4:16:25) Hash table separate chaining

⌨️ (4:24:10) Hash table separate chaining source code

⌨️ (4:35:44) Hash table open addressing

⌨️ (4:46:36) Hash table linear probing

⌨️ (5:00:21) Hash table quadratic probing

⌨️ (5:09:32) Hash table double hashing

⌨️ (5:23:56) Hash table open addressing removing

⌨️ (5:31:02) Hash table open addressing code

⌨️ (5:45:36) Fenwick Tree range queries

⌨️ (5:58:46) Fenwick Tree point updates

⌨️ (6:03:09) Fenwick Tree construction

⌨️ (6:09:21) Fenwick tree source code

⌨️ (6:14:47) Suffix Array introduction

⌨️ (6:17:54) Longest Common Prefix (LCP) array

⌨️ (6:21:07) Suffix array finding unique substrings

⌨️ (6:25:36) Longest common substring problem suffix array

⌨️ (6:37:04) Longest common substring problem suffix array part 2

⌨️ (6:43:41) Longest Repeated Substring suffix array

⌨️ (6:48:13) Balanced binary search tree rotations

⌨️ (6:56:43) AVL tree insertion

⌨️ (7:05:42) AVL tree removals

⌨️ (7:14:12) AVL tree source code

⌨️ (7:30:49) Indexed Priority Queue | Data Structure

⌨️ (7:55:10) Indexed Priority Queue | Data Structure | Source Code

—

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://www.freecodecamp.org/news

And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

@@@

at 1:14:58 shouldn’t node be inserted and deleted from beginning as its a stack??

7:00

I would like to suggest to add subtitles. English is not my native language and my listening is also not good enough to understand completely. So, without subtitle , I encounter many difficulties . I really want to learn this full course more precisely. So adding subtitles will make me more easy to learn this course. And I really appreciate freeCodeCamp for making full free courses.

I was wondering what Emo finally wound up doing…

I totally am kidding of course. Really great video, thanks for posting.

Can someone please explain me, where do we implement skip lists in real life!!

I have searched a lot of documents and previous research papers and even the internet doesn’t provide a proper solution!!

r/superstonk

The MOASS is coming

Gme

🔔

Going to watch this for my future courses in the Fall.

It is time in vain

⌨️

https://youtu.be/tkSXTfMh1C4

code samaj me nhi aate re isme….dont see

Best course on YouTube

Progress:

0:27:40

Hi do you know the right order for studying data structures courses on this channel?Becuase there are:intro to data structures,data structures and algorithms,data structures from easy to advanced.

And also what about c++ is there any courses in this channel about c++ other than the 4 hours course? Becuase I don’t believe that you can learn an entire programming language in four hours

Is it okay to watch dispute only knowing JavaScript?

if you just started with programming then u might struggle at some places but overall nice tutorial

There is an calculational error at 15:10 (second line from the bottom).

Is there any pre-requisite knowledge required before starting this course ?

Can someone explain the conversion of priority queue from min to max part at 1:45:59? I’m unable to follow what’s going on

wooow, this is the best video i have come across on this topic. thanks you

That was excellent William I’m sure my exam would be very good tomorrow. Many Many thanks

Any course teaching graph, traversal, ad dynamic programming?

58:26 find yourself someone who loves you the way this dude loves stacks 🥰

It would be great if this video had subs

Click the "JOIN" button below the video to support freeCodeCamp.org!

Which programming language is he using?

Is it java with ds?

good

What coding language is this? It’s not java or C or C++ or C# or python

4:24

What language he using in this??

Thank you so much for your videos

priority queue min heap and max heap full code in c++ using pointers and not array representation of the binary tree

#include <iostream>

#include <bits/stdc++.h>

#include <algorithm>

#include <stdbool.h>

#include <math.h>

#include <string>

#include <string.h>

using namespace std;

struct node

{

int data;

node* left;

node* right;

node* prev;

};

class max_heap

{

protected:

int first=1;

node* rroot;

node* act;

node* last;

queue<node *> q1;

stack<node *> stack1;

void traverse11(node *ptr , int x=0)

{

if(ptr!=NULL)

{

cout<<ptr->data<<"t"<<x<<endl;

traverse11(ptr->left , 1);

traverse11(ptr->right , 2);

}

}

void check(node *root)

{

cout<<"in check"<<endl;

cout<<"t"<<root->data<<endl;

if(root->prev==NULL)

{

cout<<"NULL trigger"<<endl;

return;

}else

if(root->prev->data<root->data)

{

// int x=root->prev->prev->data;

int y=root->prev->data;

int z=root->data;

cout<<"y: "<<y<<"z: "<<z<<endl;

node *temp1=root->prev->prev;

node *temp2=root->prev;

node *temp3=root;

node *temp2_left=temp2->left;

node *temp2_right=temp2->right;

temp2->data=z;

temp3->data=y;

check(temp2);

}

}

void top_check(node *root)

{

cout<<"in top_check"<<endl;

if(root==NULL )

{

cout<<"in top_ckeck_NULL trigger"<<endl;

return;

}

node *highest;

if(root->right!=NULL){

int x=max(root->left->data , root->right->data);

if(x==root->left->data)

{

highest=root->left;

}else

{

highest=root->right;

}

}else

{

if(root->left!=NULL)

{

highest=root->left;

}else

{

return;

}

}

cout<<"highest:"<<highest->data<<endl;

if(root->data>=highest->data)

{

return ;

}else

{

int temp1=root->data;

root->data=highest->data;

highest->data=temp1;

top_check(highest);

}

}

public:

node * root()

{

return rroot;

}

max_heap( )

{

queue<node *> q2;

q1=q2;

stack<node *> s1;

stack1=s1;

}

void push(int x)

{

node *new1=new node;

new1->data=x;

new1->left=NULL;

new1->right=NULL;

new1->prev=NULL;

if(first==1)

{

rroot=new1;

q1.push(new1);

q1.push(new1);

act=rroot;

last=rroot;

stack1.push(new1);

first++;

}else

{

node *temp1=q1.front();

act=temp1;

stack1.push(new1);

q1.pop();

if(temp1->left==NULL)

{

temp1->left=new1;

new1->prev=temp1;

q1.push(new1);

q1.push(new1);

check(new1);

}else if(temp1->right==NULL)

{

temp1->right=new1;

new1->prev=temp1;

q1.push(new1);

q1.push(new1);

check(new1);

}

}

}

int peek()

{

return rroot->data;

}

void pop()

{

node *last=stack1.top();

act=last->prev;

if(stack1.size()==1)

{

cout<<"rooooooooooooooooot"<<last->data<<endl;

rroot->data=0;

rroot->left=NULL;

rroot->right=NULL;

rroot->prev=NULL;

stack1.pop();

return;

}

cout<<"last_node added"<<last->data<<endl;

cout<<"act"<<act->data<<endl;

stack1.pop();

rroot->data=last->data;

if(act->left->data==last->data)

{

act->left=NULL;

}else

{

cout<<"pop else"<<endl;

act->right=NULL;

}

top_check(rroot);

delete last;

}

vector<int> heap_sort()

{

vector<int> v1;

while(stack1.size()!=0)

{

v1.push_back(peek());

pop();

}

return v1;

}

void traverse()

{

traverse11(rroot);

}

};

class min_heap : public max_heap

{

public:

void push(int x)

{

x=-x;

node *new1=new node;

new1->data=x;

new1->left=NULL;

new1->right=NULL;

new1->prev=NULL;

if(first==1)

{

rroot=new1;

q1.push(new1);

q1.push(new1);

act=rroot;

last=rroot;

stack1.push(new1);

first++;

}else

{

node *temp1=q1.front();

act=temp1;

stack1.push(new1);

q1.pop();

if(temp1->left==NULL)

{

temp1->left=new1;

new1->prev=temp1;

q1.push(new1);

q1.push(new1);

check(new1);

}else if(temp1->right==NULL)

{

temp1->right=new1;

new1->prev=temp1;

q1.push(new1);

q1.push(new1);

check(new1);

}

}

}

int peek()

{

return -(rroot->data);

}

void traverse()

{

traverse11(rroot);

}

void traverse11(node *ptr , int x=0)

{

if(ptr!=NULL)

{

cout<<-(ptr->data)<<"t"<<x<<endl;

traverse11(ptr->left , 1);

traverse11(ptr->right , 2);

}

}

vector<int> heap_sort()

{

vector<int> v1;

while(stack1.size()!=0)

{

int x=peek();

v1.push_back(x);

pop();

}

return v1;

}

};

int main()

{

max_heap mh1;

int t;

int t1=0;

cin>>t;

int data;

while(t–)

{

cout<<"data";

cin>>data;

mh1.push(data);

}

mh1.traverse();

cout<<"pop================"<<endl;

while(t1–){

cout<<"pop================"<<endl;

cout<<"peek============================================"<<mh1.peek()<<endl;

mh1.pop();

mh1.traverse();

cout<<"pop================end"<<endl;

}

mh1.traverse();

cout<<"root:"<<mh1.peek()<<endl;

cout<<"heapsort——————————–"<<endl;

vector<int> ans=mh1.heap_sort();

for(auto& it1:ans)

{

cout<<it1<<"t";

}

cout<<endl;

min_heap mi1;

mi1.push(1);

mi1.push(2);

mi1.push(3);

mi1.push(4);

mi1.push(5);

cout<<"min heap"<<mi1.peek()<<endl;

cout<<"min heap sort"<<endl;

mi1.traverse();

vector<int> ans2=mi1.heap_sort();

for(auto& it1:ans2)

{

cout<<it1<<"t";

}

}

Nicely explained 🙂

@

15:57 3n * (40 + n^3/2) = 120*n + 3*n^4/2

For path compression why is E F @ goes from F TO E instead of the prrvious a to b and c to d this really confuses me also why is it E taht gets designated as well as H WHY NOT SOME OTHER LETTER LIKE A OR B OR ANY OTHER ONES? this is in the union find path compression @ 2:55:13 just confsuing please help

I like this videos, but they are too long… Is better to have a lot of smaller videos which are easier to follow.

Just a short note for everyone studying for Coding Interviews or just studying in general; the most imp DS’s are

Arrays

Stacks

Linked Lists

Queues

Trees

Graphs and

Hash Tables

Thx i slept while listening to this and i was able to absorb everything in this vid

Edit: i got a 98% mark on the computer science test

How is this free

Great Review!

Can i just learn all this data structure’s concept from this video and then implement it in c or python or should i know java for sure?

At 2:53:50, probably A, B, C, D, E also point to G after F points to G.

Useless tutorial

Love the tutorial. Thank you very much. A friendly suggestion: Stay consistent with the operations on data structure. (e.g. Search, Access, Remove etc) and maybe define the meaning. I noticed sometimes you use ‘Search’ but really mean ‘Access’ and it becomes confusing for some of us :).

32:22 , there is a bug in function "removeAt", the if statement should be OR instead of AND.

2x save you about 4hrs of life 🙂

30:00