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:

🎥 Course created by William Fiset. Check out his YouTube channel:

⭐️ 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:

Read hundreds of articles on programming:

And subscribe for new videos on technology every day:

source

freeCodeCamp.orgFebruary 22, 2021 at 12:32 pmClick the "JOIN" button below the video to support freeCodeCamp.org!

Zaid AhmadFebruary 22, 2021 at 12:32 pmHey, quick question. I am in 10th currently {India} and don't know a thing about log, and all that mathematical stuff…..😅 SO should I consider learning this right now?

hari krishnanFebruary 22, 2021 at 12:32 pmBookmark

Mohammed AquibFebruary 22, 2021 at 12:32 pmDear freeCodeCamp.org kindly add/enable caption/subtitles to this videos. Its sometimes hard to understand some term.Thanks

LadanFebruary 22, 2021 at 12:32 pm5:20

Jorge pFebruary 22, 2021 at 12:32 pmi can use the same concepts and principles for swift?

Samarth AhujaFebruary 22, 2021 at 12:32 pm⭐️ 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

Com DomainsFebruary 22, 2021 at 12:32 pmMacXcode.Com | Godaddy Auctions | 7Day Auction

Nick RadfordFebruary 22, 2021 at 12:32 pmWhen performing lazy deletion in a hash table and you relocate the found item to the location of the first tombstone, the video opted to put null in the found location. Should you not instead replace the old position of the found item to be a tombstone? 5:30:00

prashant dubeyFebruary 22, 2021 at 12:32 pmBy Definition Heap is A complete tree, I think few examples given in heap section were wrong!! correct me if i am wrong.

Margarita KazakovaFebruary 22, 2021 at 12:32 pmi havent watched this yet, but thanks anyway, im pretty sure it will be helpful!

JOHN EDWARD BINAYFebruary 22, 2021 at 12:32 pmFreecodecmp…I am simply in awe in what you have accomplished in a span of time since I first saw your website, which was 5 years ago.

Your vision and mission to teach the people with little to no cost, so that people who can't afford to learn or maybe just to make people more knowledgeable or teach important modern skills, is such an admirable thing.

I hope you guys explore more topics soon, maybe related to computer architecture, OS, internet, IOT, robotics, etc…

HollowistFebruary 22, 2021 at 12:32 pmYeesh why does it sound like every data structure instructor sound like they normally speak at x .75 speed? They all seem so unethusiastic

Awais fiazFebruary 22, 2021 at 12:32 pmDay 1 : 13:00

Ananthu K KumarFebruary 22, 2021 at 12:32 pmThese codes do no t have a main method how is it is supposd to run.

Sushant KharaFebruary 22, 2021 at 12:32 pmThanks so much FCC for this great content for free, Thanks Quincy and FCC Team.

Ananthu K KumarFebruary 22, 2021 at 12:32 pmWhy is the Dynamic array code is not having main class.

AlokFebruary 22, 2021 at 12:32 pmHas anyone really watched this full 8 hrs video?

Elbert GonzalesFebruary 22, 2021 at 12:32 pmesti geloasă pagubă in ciuperci love

IvanFebruary 22, 2021 at 12:32 pmDoes anyone know if watching this would be enough to start doing Leetcode?

Utopia LightFebruary 22, 2021 at 12:32 pmWho's here for class?

Wilson WilsonFebruary 22, 2021 at 12:32 pmStocks dipped Wednesday as investors awaited another batch of corporate earnings results and the Federal Open Market Committee’s (FOMC) January monetary policy decision. The S&P 500 traded lower by about 1.5%, pulling back from the index’s all-time high. The Dow also sank by more than 1%, as shares of Boeing (BA) dropped after posting a record annual loss and booking additional charges over its delayed 777X aircraft roll-out. The Nasdaq dipped even as some heavily weighted tech stocks pushed higher. Shares of Microsoft (MSFT) jumped, shares of GameStop (GME) more than doubled after closing higher by 93% a day earlier earlier. According to Popular Stock analyst Dr Rodrick Jonathan the new strain of Covid 19 virus is going to put a scare into the Stock market, for at another 3 months only the Large cap tech-related companies will keep surging because of the stay-at-home environment, which has also accelerated a number of positive tech trends, For now you can only make profit with positive trading strategy, don't panic sell, i was able to make $50,000 with $10,000 in 3 weeks with Dr Rodrick's stock trading strategy, reach him on Email: bryangreen809@gmail.com or WhatsApp: +49(1521)9263-482,

WilliamFisetFebruary 22, 2021 at 12:32 pmpeanut butter toast

Darcy DixonFebruary 22, 2021 at 12:32 pmRoses are red violets are blue if you give a like God will forgive you 0:22xx.

Rodolfo VitangcolFebruary 22, 2021 at 12:32 pmBusiness Opportunity in Ruvol

I have invented a Board Game [still unpublished and not yet out in the market] that I believe is guaranteed to be as challenging and exciting as CHESS. I called it “RUVOL.”

It is my hope that one day Ruvol may surpass chess as the “Number One Board Game in the World.”

The weakness of chess is it always starts in fixed positions that the opening moves become “memorizable.” In fact, not a few have so mastered the moves that they can play against their opponents “blindfolded.” It is for this very reason that the great Bobby Fischer introduced his so-called “Fischer Random Chess,” where the starting position of the pieces is “randomized” to make the memorization of openings impracticable. Fortunately, it is also for this reason that I invented Ruvol where “every game” has been calculated to be a challenging one to play.

HOW IS RUVOL PLAYED and HOW YOU CAN MONETIZE IT?

I detailed everything in my YouTube video. Here is the link: https://www.youtube.com/watch?v=jcqth0m3-R0

BIG MONEY POTENTIAL IN RUVOL!

It is worthwhile to note that the people who play chess will be the same people who will play Ruvol. In my Google search, I learned there are around 800 million chess players in the world. Even just a small percentage of these 800 million is good enough to earn big money from Ruvol either as an ONLINE GAME BUSINESS or as a PHYSICAL PRODUCT DISTRIBUTOR.

You may contact me at: rodolfovitangcol@gmail.com.

Thanks and God bless!

RODOLFO MARTIN VITANGCOL

The Ruvol Inventor

Rodolfo VitangcolFebruary 22, 2021 at 12:32 pmBusiness Opportunity in Ruvol

I have invented a Board Game [still unpublished and not yet out in the market] that I believe is guaranteed to be as challenging and exciting as CHESS. I called it “RUVOL.”

It is my hope that one day Ruvol may surpass chess as the “Number One Board Game in the World.”

The weakness of chess is it always starts in fixed positions that the opening moves become “memorizable.” In fact, not a few have so mastered the moves that they can play against their opponents “blindfolded.” It is for this very reason that the great Bobby Fischer introduced his so-called “Fischer Random Chess,” where the starting position of the pieces is “randomized” to make the memorization of openings impracticable. Fortunately, it is also for this reason that I invented Ruvol where “every game” has been calculated to be a challenging one to play.

HOW IS RUVOL PLAYED and HOW YOU CAN MONETIZE IT?

I detailed everything in my YouTube video. Here is the link: https://www.youtube.com/watch?v=jcqth0m3-R0

BIG MONEY POTENTIAL IN RUVOL!

It is worthwhile to note that the people who play chess will be the same people who will play Ruvol. In my Google search, I learned there are around 800 million chess players in the world. Even just a small percentage of these 800 million is good enough to earn big money from Ruvol either as an ONLINE GAME BUSINESS or as a PHYSICAL PRODUCT DISTRIBUTOR.

You may contact me at: rodolfovitangcol@gmail.com.

Thanks and God bless!

RODOLFO MARTIN VITANGCOL

The Ruvol Inventor

Abhas KumarFebruary 22, 2021 at 12:32 pmDesesan egan sou

Павел БозмаровFebruary 22, 2021 at 12:32 pmwill this course be ok for me if I know only python, guys?

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmhttps://youtu.be/RBSGKlAvoiM?t=22319

Fenwick tree

LSB(i) = i & -i

-i = 2s complement of i

2s complement of i = 1s complement of i + 1

example : LSB(10)

10 = 0b00001010

1s complement of 10 = 0b11110101

1s complement of 10 + 1 = 0b11110110

So -10 & 10 = 0b 0000 1010 &0b 1111 0110

= 0b 0000 0010

= 2^1

= 2

– Madhukiran

Hamza MehmoodFebruary 22, 2021 at 12:32 pmhttps://www.youtube.com/watch?v=eriPrVVD7OM&t=1426s

This course is composed by Nazeer Muhammad (Ph.D, Hanyang University, South Korea:2010-2015). This course showcases the basic concepts of Calculus and Analytical Engineering. This is managed by FARCIM (Fachhochschule Advanced Research in Computing and Imaging Mathematics) Lab.

Hamza MehmoodFebruary 22, 2021 at 12:32 pmhttps://www.youtube.com/watch?v=eriPrVVD7OM&t=1426s

This course is composed by Nazeer Muhammad (Ph.D, Hanyang University, South Korea:2010-2015). This course showcases the basic concepts of Calculus and Analytical Engineering. This is managed by FARCIM (Fachhochschule Advanced Research in Computing and Imaging Mathematics) Lab.

Muntasir Mahmud SaifFebruary 22, 2021 at 12:32 pmis this based on java?

JTC INDIAFebruary 22, 2021 at 12:32 pmI do want to upload my videos on this channel … How can I do that ?? Any suggestions

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmhttps://youtu.be/RBSGKlAvoiM?t=16191

Hashtable

Separate Chaining source code

not sure if ur normalizeIndex() defn is correct.

You're ignoring the sign bit and taking the rest of the value.

But -ve values are stored in 2s complement notation.

For example a 32bit number 1 + 30 0s + 1 is 1s complement of that (0 + 30 1s + 0) + 1 = 0 + 31 1s (coz 2s complement is 1s complement + 1). 31 1s is 2^31 -1. Hence 1 + 30 0s + 1 is -(2^31 -1). If we wanna take the absolute value, normalizeIndex should return 2^31 – 1, which would be 0 + 31 1s.

But, ur normalizeIndex() method would return 0 + 30 0s + 1 = 1.

I guess the normalizeIndex(keyHash) method should return the 2s complement of input parameter whenever the sign bit is 1. OR, best would be to just call abs(keyHash) or return -1 * keyHash whenever keyHash < 0.

PLEASE COMMENT.

– Madhukiran

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmhttps://youtu.be/RBSGKlAvoiM?t=14177

BST

remove() op

I wud recommend 2 improvements to ur code :

(1) when contains() has already located the node, why remove() has to traverse again from root! Instead, we can directly start the "remove" work from the searched node

(2) when the searched node has both left and right subtrees — diveLeft() already gave the smallest in right subtree. We can directly remove it (using "node has only left or right subtree logic). No need to once again traverse from <searched node>.right till the <smallest nodes in right sub tree>

– Madhukiran

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmhttps://youtu.be/RBSGKlAvoiM?t=14177

BST

height(node)

the stack of recursive calls can be TREMENDOUSLY reduced with 1 additional stmt

if(node == null) return 0;

if(node.left == null && node.right == null) return 1; <— THIS LINE

return max(height(node.left), height(node.right)) + 1;

– Madhukiran

Jauhar AliFebruary 22, 2021 at 12:32 pmI didn't get the for loop and if (i — rm_index) j– at https://youtu.be/RBSGKlAvoiM?t=1992

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmhttps://youtu.be/RBSGKlAvoiM?t=11001

Path Compression w/ UnionFind DS

Instead of Bijection (maintain a map of vertices (represented by alphabets) and numbers 1 to # of vertices), we can determine array id[] index as vertex – 'A' (which gives 0 for A, 1 for B, etc). And we can avoid maintaining this bijection map DS. Makes sense?

– Madhukiran

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmRequesting to please consider my words here sportively. I'm sorry to say this but I've been finding it very tough to follow your english accent. You're not clearly pronouncing all the words in a sentence. You've been eating them up while talking. I guess you do that so to make it comfortable and smooth for u to talk. But following the technical points is becoming tough in some places, and I have to repeatedly rewind to understand what u might be saying. Additionally, the volume levels of the video are pretty low. I request you to please make these adjustments in ur future videos. Otherwise, the video content is of terrific quality and I'm grateful for that… immensely.

– Madhukiran

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmhttps://youtu.be/RBSGKlAvoiM?t=8399

priority queue source code

when u r using java library's ArrayList as the dynamic array to maintain the heap, why not allow the list to expand on it's own? Instead, why r u controlling the list capacity programmatically? Won't the add() performance be poor if we increment capacity by 1 every time heap hits max capacity?

– Madhukiran

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmhttps://youtu.be/RBSGKlAvoiM?t=8219

Priority Queue using Binary Heap. BH using Array & Hashtable :

create heap via heapify approach :

The pdf has maths formula to arrive at O(n) time complexity for heapify, and is definitely impossible to understand unless one is expert in integration and other complex maths concepts.

A simple way :

for tree height = 3, calculate number of nodes at each level, and number of levels to sink down in worst case (sink till leaf node level), get their product, and add the products for all levels. Similarly do for height = 4 5 6 etc. And u will notice that total cost would be = n – (h+1) where n is number of nodes in the tree, and h is the tree height. So, Big-O would be O(n) as n >> h (h wud be a tiny number than n)

– Madhukiran

Jenn RFebruary 22, 2021 at 12:32 pmTaking this class rn in uni.😭

Madhukiran AttivilliFebruary 22, 2021 at 12:32 pmhttps://youtu.be/RBSGKlAvoiM?t=5210

Queue

Don't u think it makes better sense to enqueue at the head and dequeue at the tail?

coz in ur linked list representation the arrows are always in head -> tail direction

arrow wud indicate the direction of enqueuing and dequeuing.

Please comment

– Madhukiran

CloudFebruary 22, 2021 at 12:32 pmI've taken DS course in college but forgot most of it, is watching this an effective way to refresh the knowledge?

Shreyansh GuptaFebruary 22, 2021 at 12:32 pm17:00

NOVA GAMINGFebruary 22, 2021 at 12:32 pmI <3 it