This repository contains my personal notes on Data Structures and Algorithms, with links to websites, courses, books, and other valuable materials.
The following is a list of online courses, YouTube videos, and websites to help learn Data Structures & Algorithms. Note that these are not in order of completion.
All Resources | Type | Links | Notes |
---|---|---|---|
LeetCode | website |
Website Link | |
NeetCode | website |
Website Link | |
AlgoMap | website |
Website Link | |
TopSWE | website |
Website Link | |
LeetCode Patterns | website |
Website Link | |
NeetCode Roadmap | website |
Website Link | |
VisuAlgo | website |
Website Link | |
Data Structure Visualizations | website |
Website Link | |
Big-O CheatSheet | website |
Website Link | |
Data Structure Visualization | website |
Website Link | |
NeetCode Courses | course |
Course Link | Notes |
Python Data Structures & Algorithms + LEETCODE Exercises | course |
Course Link | Notes |
The Last Algorithms Course You'll Need | course |
Course Link | |
Algorithms and Data Structures Tutorial - Full Course for Beginners - FreeCodeCamp | youtube-videos |
Video Link | Notes |
NeetCode YouTube Videos | youtube-videos |
Channel Link | Notes |
Coding Interview University | github-repo |
Repository Link | |
Awesome Algorithms | github-repo |
Repository Link |
- Neetcode Courses
- Python Data Structures & Algorithms + LEETCODE Exercises
- The Last Algorithms Course You'll Need
- Algorithms and Data Structures Tutorial - Full Course for Beginners - FreeCodeCamp
- Neetcode Videos on YouTube
- Cracking the Coding Interview
- Introduction to Algorithms
Arrays
What is Data Structure?
- Data Structure is a way of structuring data inside of RAM of a computer.
How do ew store an array in RAM?
- RAM is measured in bytes. One byte is 8 bits. A bit can be thought of as a position that can store a digit, which has to be either 0 or 1.
NOTE!
- Arrays are always stored contiguously in RAM, meaning that they are stored one next to another (there is nothing between them.
NOTE!
- Static arrays are Fixed arrays. The biggest limitation of Static Arrays is that we cannot add / delete elements after creation. Technically, we can remove a value, but removing here only means overriding. We cannot actaully delete the value in memory. But, we can override by putting, let's say, 0 in the index location of it.
Big O Time Complexity of Static Arrays Operations
Operation | Big O Time |
---|---|
Read / Write i-th element | O(1) |
Insert / Remove End | O(1) |
Insert Middle | O(n) |
Remove Middle | O(n) |
NOTE!
- In Python and JavaScript, Dynamic Arrays are the default. In Java, we can use an Array List, and in C++, we can use a Vector.
What is Amortized Time Complexity?
- Amortized Time Complexity
Linked List
Recursion
Sorting
Binary Search
Trees
Backtracking
Heap & Priority Queue
Hashing
Graphs
Dynamic Programming
Bit Manipulation
Arrays
Linked Lists
Trees
Heaps
Backtracking
Graphs
Dynamic Programming
Note
Coming Soon.
Note
Coming Soon.
Introduction to Algorithms
What is an Algorithm
- An Algorithm is a set of steps or instructions for completing a certain task. For example, a recipe is an algorithm. To-Do List for a Morning Routine is an algorithm. However, in the context of Computer Science, an algorithm more specifically means a set a steps a program takes to finish a certain task.
Time Complexity
- Time Complexity is a measure of how long it takes the algorithm to run.
Space Complexity
- Space Complexity deals with the amount of memory taken up on the computer.
Balance between Time & Space Complexity
- A good algorithm needs to balance between Time and Space Complexity to be useful. For example, you can have a very fast algorithm but it may not matter if the algorithm consumes more memory than you have available.
Running Time of an Algorithm
- How long the algorithm runs for a given set of values until the output is called The Running Time or The Running Time of an Algorithm and is used to define Time Complexity.
Linear Search (Sequential Search)
- Linear Search is a sequential searching algorithm where we start from one end and check every element of the list until the desired element is found. It is the simplest searching algorithm.
Binary Search (Hald Interval Search)
- Binary Search is a searching algorithm for finding an element's position in a sorted way. In this approach, the element is always searched in the middle of a portion of an array. Binary Search can be implemented only on a sorted list of items. If the elements are not sorted already, we need to sort them first.
Guidelines for defiing an Algorithm:
- The steps in the Algorithm need to be in a specific order.
- The steps also need to be distinct.
- The algorithm should produce a result.
- The algorithm should complete in a finite amount of time.
Introduction to Data Structures
Algorithms: Sorting and Searching
Note
Coming Soon.