Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Arrays/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Arrays

This directory contains Python implementations of common array-related problems and algorithms.

## Contents

### Anagram Check
Checks if two strings are anagrams of each other.
- **Files**: `Anagram_Check_Sorted_Sol.py`, `Anagram_Check_manual_Sol.py`

### Array Pair Sum
Given an integer array, output all unique pairs that sum up to a specific value `k`.
- **File**: `ArrayPairSumSol.py`

### Find Missing Element
Find the missing element in a shuffled second array.
- **Files**: `ArrayFindTheMissingElement_XOR_sol.py`, `ArrayFindTheMissingElement_brute_force_sol.py`, `ArrayFindTheMissingElement_hash_table_sol.py`, `ArrayFindTheMissingElement_takingSumandSubtract_sol.py`
9 changes: 9 additions & 0 deletions Error-debug/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Error Handling

This directory contains examples and scripts demonstrating error handling and debugging techniques in Python.

## Contents

### Basic Exception Handling
Demonstrates `try-except-else-finally` blocks and user input validation.
- **File**: `ErrorExceptions.py`
21 changes: 21 additions & 0 deletions GraphAlgorithms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Graph Algorithms

This directory contains Python implementations of common graph algorithms and data structures.

## Contents

### Adjacency List Implementation
Basic representation of a graph using an adjacency list.
- **File**: `AdjacencyListGraphImple.py`

### Breadth First Search (BFS) - Word Ladder Problem
Implementations related to BFS and its application in solving the word ladder puzzle.
- **Files**: `BFS.py`, `WordLadderProblem.py`

### Depth First Search (DFS) - Knight's Tour Problem
Implementations of DFS and the Knight's Tour problem.
- **Files**: `DFSImpleTheKnightsTourProblem.py`, `TheKnightsTourProblem.py`

### General DFS
A more general implementation of Depth First Search.
- **File**: `DFSGeneral.py`
25 changes: 25 additions & 0 deletions LinkedLists/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Linked Lists

This directory contains implementations of various types of linked lists and common linked list algorithms in Python.

## Contents

### Singly Linked List Implementation
Basic skeleton for a Singly Linked List.
- **File**: `SingleLinkedListImple.py`

### Doubly Linked List Implementation
Basic skeleton for a Doubly Linked List.
- **File**: `DoublyLinkedListImple.py`

### Singly Linked List Cycle Check
Check if a singly linked list contains a cycle using the "two runners" (slow and fast pointers) strategy.
- **File**: `SinglyLinkedListCycleCheckImple.py`

### Reverse a Linked List
Reverse a linked list in-place.
- **File**: `LinkedListReversal.py`

### Nth to Last Node
Find the nth to last node in a linked list.
- **File**: `LinkedListNthToLastNode.py`
13 changes: 13 additions & 0 deletions Queues/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Queues

This directory contains Python implementations of the Queue data structure.

## Contents

### Queue Implementation
Basic queue operations (FIFO): `enqueue`, `dequeue`, `isEmpty`, `size`.
- **File**: `QueueImple.py`

### Queue with Two Stacks
Implementation of a queue using two stacks.
- **File**: `QueueWith2StacksImple.py`
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ Trim a BST so all nodes are within a given range `[min, max]`.
Implementing a tree using classes and references.
- **File**: `Trees/TreeRepresentationWithNodesReferences.py`

### Tree Representation (List of Lists)
Implementing a tree using a list of lists representation.
- **File**: `Trees/buildTreeTest.py`

### Tree Level Order Print
Print a binary tree in level order.
- **File**: `Trees/TreeLevelOrderPrintImple.py`
Expand Down
33 changes: 33 additions & 0 deletions Recursion/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Recursion

This directory contains various Python examples demonstrating recursive algorithms and techniques.

## Contents

### Cumulative Sum
Compute the cumulative sum from 0 to `n`.
- **File**: `RecursionCumulativeSum.py`

### Sum of Digits
Returns the sum of all individual digits in an integer.
- **File**: `RecursionSumOfDigits.py`

### Word Split
Determine if a string can be split into words found in a given list.
- **File**: `RecursionWordSplit.py`

### Reverse a String
Recursive implementation to reverse a string.
- **File**: `RecursionReverseStr.py`

### String Permutations
Output all possible permutations of a string.
- **File**: `RecursionStrPermutation.py`

### Fibonacci Sequence
Implementations using recursion, iteration, and dynamic programming (memoization).
- **Files**: `FibonacciSeqRecursion.py`, `FibonacciSeqIterative.py`, `FibonacciSeqDynamic.py`

### Coin Change Problem
Find the fewest coins needed to make a change amount.
- **Files**: `CoinChangeProblemRecursion.py`, `CoinChangeProblemDynamic.py`
23 changes: 23 additions & 0 deletions Sorting/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Sorting

This directory contains Python implementations of common sorting algorithms.

## Contents

### Bubble Sort
- **File**: `BubbleSortImple.py`

### Selection Sort
- **File**: `SelectionSortImple.py`

### Insertion Sort
- **File**: `InsertionSortImple.py`

### Merge Sort
- **File**: `MergeSortImple.py`

### Quick Sort
- **File**: `QuickSortImple.py`

### Shell Sort
- **File**: `ShellSortImple.py`
13 changes: 13 additions & 0 deletions Stacks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Stacks

This directory contains Python implementations of the Stack data structure and related algorithms.

## Contents

### Stack Implementation
Basic stack operations (LIFO): `push`, `pop`, `peek`, `isEmpty`, `size`.
- **File**: `StackImple.py`

### Balanced Parentheses Check
Check if a string of opening and closing parentheses is balanced.
- **File**: `BalanceParenthlessCheckImple.py`
35 changes: 35 additions & 0 deletions Trees/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Trees

This directory contains Python implementations of binary trees and related algorithms.

## Contents

### Binary Search Tree Implementation
- **File**: `BinarySearchTreesImple.py`

### Binary Heap Implementation
- **File**: `BinaryHeapImple.py`

### Binary Search
Recursive and iterative implementations.
- **Files**: `BinarySearchImple.py`, `BinarySearchRecursiveImple.py`

### Validate BST
Check if a binary tree is a valid Binary Search Tree.
- **Files**: `BinarySearchTreeCheckImpleSol1.py`, `BinarySearchTreeCheckImpleSol2.py`

### Trim a BST
Trim a BST so all nodes are within a given range `[min, max]`.
- **File**: `TrimBinarySearchTreeImple.py`

### Tree Representation (Nodes & References)
Implementing a tree using classes and references.
- **File**: `TreeRepresentationWithNodesReferences.py`

### Tree Representation (List of Lists)
Implementing a tree using a list of lists representation.
- **File**: `buildTreeTest.py`

### Tree Level Order Print
Print a binary tree in level order.
- **File**: `TreeLevelOrderPrintImple.py`
9 changes: 9 additions & 0 deletions deque/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Deque

This directory contains Python implementations of the Double-ended queue (Deque) data structure.

## Contents

### Deque Implementation
Double-ended queue operations: `addFront`, `addRear`, `removeFront`, `removeRear`, `isEmpty`, `size`.
- **File**: `DequeImple.py`