This repository contains implementations of core data structures and algorithms in Python, focusing on clarity, extensibility, and practical use cases.
The project covers three main areas:
- Self-balancing binary trees (AVL)
- Graph algorithms (BFS, DFS, shortest path)
- Sorting algorithms with custom comparators
The goal is to demonstrate a solid understanding of algorithmic foundations and how they can be applied to real-world scenarios.
File: trees_avl_bst.py
Features:
- Binary Search Tree (BST) implementation
- Self-balancing AVL tree using rotations
- TreeMap abstraction (dictionary-like interface)
- Insert, delete, search operations
- Tree balancing and validation utilities
- Tree traversal and visualization
Key concepts:
- Height balancing
- Rotations (left, right, double)
- Time complexity optimization (O(log n))
File: graphs_algorithms.py
Features:
- Graph representation (adjacency list)
- Breadth-First Search (BFS)
- Depth-First Search (DFS) with cycle detection
- Shortest path using priority queue (Dijkstra-like approach)
Key concepts:
- Graph traversal
- Pathfinding
- Cycle detection
- Weighted vs unweighted graphs
File: sorting_algorithms.py
Features:
- Merge Sort
- Quick Sort
- Insertion Sort
- Bubble Sort
- Custom comparator support for sorting complex objects
Example use case:
Sorting custom objects (e.g. notebooks) by different attributes like likes or title.
Key concepts:
- Divide and conquer
- In-place vs non in-place sorting
- Algorithmic complexity
- Comparator-based design
Each module includes inline test cases demonstrating functionality and expected behavior.
This project is part of a continuous effort to strengthen algorithmic thinking and build a solid technical foundation for data and software engineering roles.
- Python 3
- Standard Library (heapq, etc.)
- Unit testing with pytest
- Performance benchmarking
- Visualization tools for trees and graphs
- API-style interface for reuse in other projects
Manuel González