Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Mastering Data Structures and Algorithms: A Comprehensive Revision Guide

Rating
-
Sold
-
Pages
97
Uploaded on
04-03-2023
Written in
2022/2023

Unlock your potential as a programmer with 'Mastering Data Structures and Algorithms.' This concise yet comprehensive revision guide is packed with essential concepts, examples, and practice problems to help you ace your exams and interviews. Perfect for students and professionals alike, this guide will give you the edge you need to excel in the field of computer science.

Show more Read less
Institution
Course

Content preview

Complete Data structures and UPDATED
Algorithms Guide
Resources, Notes, Videos, Solutions
2022




This document provides a complete guide to understanding data structures and
algorithms in computer science. It contains a collection of information compiled by
people who have successfully completed interviews at FAANG companies as well
as a useful information, tips, graphics, etc. to help better understand the subject
matter and be a better coder or to ace that interview.

This guide is provided to you with the mission of making the world’s resources
more accessible to all.

Enjoy!

, BlockTrain.info



Table of Contents

The document is divided as follows.

Table of Contents………………………………………………………………………………………………….………………………..………………2
Complete Data structures and Algorithms Roadmap......................................................................................... 3
Our Aim........................................................................................................................................................3
Practice.........................................................................................................................................................3
Arrays................................................................................................................................................................... 4
Introduction ................................................................................................................................................. 4
Hash maps, tables ........................................................................................................................................ 4
2 Pointers ............................................................................................................................................................. 5
Linked List.............................................................................................................................................................9
Sliding Window.................................................................................................................................................. 13
Binary Search ..................................................................................................................................................... 18
Recursion............................................................................................................................................................25
Backtracking....................................................................................................................................................... 32
BFS, DFS.............................................................................................................................................................. 40
Dynamic Programming ...................................................................................................................................... 52
Trees................................................................................................................................................................... 63
Graphs................................................................................................................................................................ 70
Topological Sorting ............................................................................................................................................ 81
Greedy Algorithms............................................................................................................................................. 85
Priority Queue....................................................................................................................................................88
Tries.................................................................................................................................................................... 93
Additional Topics ............................................................................................................................................... 96
Kadane’s algorithm.....................................................................................................................................96
Djikstra’s algorithm....................................................................................................................................97
AVL Trees....................................................................................................................................................98
Sorting........................................................................................................................................................99
More...........................................................................................................................................................99
Additional Awesomeness .................................................................................................................................. 99



2

, BlockTrain.info


- Enjoy the process and start today. I’m sure you’ll do great. Have fun.



Arrays

Introduction
⭐ Informally, an array is a list of things. It doesn’t matter what the things are; they can be
numbers, words, apple trees, or other arrays. Each thing in an array is called an item or
element. Usually, arrays are enclosed in brackets with each item separated by commas, like
this: [1, 2, 3]. The elements of [1, 2, 3] are 1, 2, and 3.
- Introduction to Arrays
- https://www.cs.cmu.edu/~15122/handouts/03-arrays.pdf
- An Overview of Arrays and Memory (Data Structures & Algorithms #2)
- What is an Array? - Processing Tutorial


Arrays are used with all different types of data structures to solve different problems, so it’s kind
of hard to come up with array questions with just an array logic. Let’s discuss some of the most
famous patterns which concern arrays most of the time.


2D matrices are also arrays and are very commonly asked in interviews. A lot of graph, DP, and
search based questions involve the use of a 2D matrix and it’s important to understand the core
concepts there. We’ve discussed the common patterns in each section below so make sure to
check that out.


Hash maps, tables
⭐ A hash table is a data structure that implements an associative array abstract data type, a
structure that can map keys to values. In other words, we can store anything in the form of key
value pairs.
Example: map<string, string>, means that this is a hashmap where we store string key and
value pairs.




4

, BlockTrain.info




Resources
- Hashmap and Map Powerful Guide
- Data Structure and Algorithms - Hash Table
- Leetcode discuss: Hashtable implementation


Questions
- 1. Two Sum
- 771. Jewels and Stones
- Leetcode : How Many Numbers Are Smaller Than the Current Number
- Partition Labels


_______________________________________
_______________________________________



2 Pointers

⭐ For questions where we’re trying to find a subset, set of elements, or something in a sorted
array -> 2 pointers approach is super useful.




5

Written for

Institution
Study
Course

Document information

Uploaded on
March 4, 2023
Number of pages
97
Written in
2022/2023
Type
Class notes
Professor(s)
Mr. kalash bhadoriya
Contains
All classes

Subjects

$8.89
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
kalashbhadoriya

Get to know the seller

Seller avatar
kalashbhadoriya the emerald heights international school
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions