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
File renamed without changes.
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 Deque (Double-Ended Queue) data structure.

## Contents

- [Deque Implementation](DequeImple.py): Basic implementation of a Deque using a Python list.
- `addFront()` and `removeFront()`: $O(1)$ complexity as they operate on the end of the list.
- `addRear()` and `removeRear()`: $O(n)$ complexity due to list shifting when inserting/popping at index 0.
File renamed without changes.
2 changes: 1 addition & 1 deletion Error-debug/README.md → ErrorHandling/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Error and Debugging
# Error Handling

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

Expand Down
6 changes: 4 additions & 2 deletions Queues/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ This directory contains Python implementations of the Queue data structure.

## Contents

- [Queue Implementation](QueueImple.py): Basic implementation of a FIFO (First-In-First-Out) queue using a Python list. Includes `enqueue`, `dequeue`, `isEmpty`, and `size` methods.
- [Queue with Two Stacks](QueueWith2StacksImple.py): Implements a queue using two stacks (represented by Python lists) to achieve FIFO behavior.
- [Queue Implementation](QueueImple.py): Basic implementation of a FIFO (First-In-First-Out) queue using a Python list.
- `enqueue()`: $O(n)$ complexity due to `insert(0)`.
- `dequeue()`: $O(1)$ complexity using `pop()`.
- [Queue with Two Stacks](QueueWith2StacksImple.py): Implements a queue using two stacks to achieve FIFO behavior with $O(1)$ amortized complexity for both `enqueue` and `dequeue`.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
- [Getting Started](#getting-started)
- [Project Structure](#project-structure)
- [Data Structures](#data-structures)
- [Arrays](#arrays)
- [Linked Lists](#linked-lists)
- [Stacks](#stacks)
- [Queues](#queues)
- [Deque](#deque)
- [Trees](#trees)
- [Arrays](#arrays-)
- [Linked Lists](#linked-lists-)
- [Stacks](#stacks-)
- [Queues](#queues-)
- [Deque](#deque-)
- [Trees](#trees-)
- [Algorithms](#algorithms)
- [Sorting](#sorting)
- [Recursion & Dynamic Programming](#recursion--dynamic-programming)
- [Graph Algorithms](#graph-algorithms)
- [Sorting](#sorting-)
- [Recursion & Dynamic Programming](#recursion--dynamic-programming-)
- [Graph Algorithms](#graph-algorithms-)
- [Error Handling & Debugging](#error-handling--debugging)
- [Usage](#usage)
- [Quick Reference](#quick-reference)
Expand Down Expand Up @@ -80,15 +80,15 @@ python3 Sorting/BubbleSortImple.py
```
.
├── Arrays/ # 🔤 Array-based problems and algorithms
├── Error-debug/ # ⚠️ Error handling and debugging examples
├── Deque/ # 🔄 Double-ended queue
├── ErrorHandling/ # ⚠️ Error handling and debugging examples
├── GraphAlgorithms/ # 🗺️ Graph traversal (BFS, DFS) and pathfinding
├── LinkedLists/ # 🔗 Singly and Doubly Linked Lists
├── Queues/ # 📦 Queue implementations (FIFO)
├── Recursion/ # 🔀 Recursive problems and Dynamic Programming
├── Sorting/ # 📊 Common sorting algorithms
├── Stacks/ # 📚 Stack implementations and applications
├── Trees/ # 🌳 Binary Trees, BSTs, Heaps, and Traversals
├── deque/ # 🔄 Double-ended queue
├── CONTRIBUTING.md # 🤝 Contribution guidelines
├── LICENSE # 📄 MIT License
└── README.md # 📖 This file
Expand Down Expand Up @@ -123,7 +123,7 @@ FIFO (First-In-First-Out) data structures.

### Deque 🔄
Double-ended queue operations.
- [Deque Implementation](deque/DequeImple.py): Operations at both ends
- [Deque Implementation](Deque/DequeImple.py): Operations at both ends

### Trees 🌳
Hierarchical data structures.
Expand Down Expand Up @@ -168,7 +168,7 @@ Algorithms for graph traversal and pathfinding.

## ⚠️ Error Handling & Debugging

- [Error and Exceptions](Error-debug/ErrorExceptions.py): Demonstrates `try`, `except`, `else`, and `finally` blocks for robust error handling.
- [Error and Exceptions](ErrorHandling/ErrorExceptions.py): Demonstrates `try`, `except`, `else`, and `finally` blocks for robust error handling.

---

Expand Down
4 changes: 2 additions & 2 deletions Stacks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ This directory contains Python implementations of the Stack data structure and i

## Contents

- [Stack Implementation](StackImple.py): Basic implementation of a LIFO (Last-In-First-Out) stack using a Python list. Includes `push`, `pop`, `peek`, `isEmpty`, and `size` methods.
- [Balanced Parentheses Check](BalanceParenthlessCheckImple.py): Uses a stack to check if a string of opening and closing parentheses (round, square, and curly) is balanced.
- [Stack Implementation](StackImple.py): Basic implementation of a LIFO (Last-In-First-Out) stack using a Python list. All operations (`push`, `pop`, `peek`) are $O(1)$.
- [Balanced Parentheses Check](BalanceParenthlessCheckImple.py): Uses a stack to check if a string of opening and closing parentheses is balanced in $O(n)$ time.
7 changes: 0 additions & 7 deletions deque/README.md

This file was deleted.