# Data Structures and Algorithms

Learning Data Structures and Algorithms is important in Computer Science because they allow you to solve challenging problems.

Data Structures and Algorithms Resources that I have used:

1. Data Structures & Algorithms in Python Book - Goodrich
2. The Algorithm Design Manual - Steven Skiena

Data Structures and Algorithms Repository

Big O Notation

# Algorithms:

## Sorting Algorithms

Insertion Sort

Merge Sort

Quick Sort

Bubble Sort

Project using Sorting Algorithms coming soon!

### Sorting Algorithm Complexity

Algorithm Running Time (Average) Running Time (Worst) Space Complexity (Worst)
QuickSort (n log(n)) O (n^2) O(n log(n))
Insertion Sort (n) O (n^2) O(1)
Merge Sort (n log(n)) O(n log(n)) O(n)
Bubble Sort (n) O (n^2) O(1)

# Data Structures:

## Arrays:

Intro to Arrays

• The Simplest Data Structure

## Stacks and Queues

Stacks

Queues

• Deques

• Circular Queue

• Includes:

• Insertion, Deletion, Find the Nth-to-last Node, Length of Singly Linked List
• Rotate around a Pivot, Reverse Linked List, Node Swap, Remove Duplicates

Doubly:

• Insertion, Deletion, Append and Prepend Doubly Linked List
• Pairs with Sum, Remove Duplicates, Reverse Doubly Linked List

• Insertion, Deletion, Split list, and Josephus Problem using Circular Linked Lists

## Trees

Tree Data Structure

Includes:

1. General Tree
2. Binary Tree
3. Binary Search Tree
• AVL Tree, Red-Black Tree, Splay Tree, Treap, B -Tree

## Heaps

• Special Tree-Based data structure
• Usually represented as an Array

Heap Data Structure

Two Types of Heaps

1. Min Heap
2. Max Heap

Different Applications of Heaps:

1. Heap Sort - One of the best sorting algorithms!
2. Priority Queues
3. Graph Algorithms

## Maps and Hash Tables

Hash Tables

• Hash Tables

• Includes Hash Project (in progress)

## Graphs

Introduction to Graphs

• Properties of Graphs

• Self-Loop, Multi-Edges, Walk, Path, Trail
• Connected and Strongly Connected Graphs, Closed Walk, Cycle, Acyclic Graph
• Graph Representation

• List and Matrix Representation
• Graph Traversals
• Depth First Search and Breadth First Search
• Topological Sort

• Shortest Path
• Djikstra’s Algorithm and Warshall’s Algorithm
• Minimum Spanning Tree (MST)

• Includes Graph Project

## Dynamic Programming

• Greedy Algorithm

• Includes Dynamic Programming Project

## Extra

Iterators and Generators in Python