This repository contains a personal collection of handwritten algorithms and data structures implemented by Pavel Khramov.
Each algorithm is written from scratch with clarity and efficiency in mind, serving both as a learning resource and a ready-to-use toolkit for algorithmic problem solving.
The collection covers fundamental computer science topics, including:
- Graph algorithms
- Sorting methods
- Data structures
- Optimization and numerical techniques
- Differential equations solve methods
- AVL Tree – Self-balancing binary search tree implementation
- Disjoint Set Union (DSU) – Union-Find structure with path compression
- Segment Tree – Efficient range query and update structure
- Hashes – Basic hashing utilities and collision handling examples
- Bucket Sort + Bubble Sort – Hybrid sorting implementation for grouped elements
- Counting Sort – Non-comparison linear-time sorting algorithm
- BFS (Breadth-First Search) – Level-order graph traversal
- DFS (Depth-First Search) – Recursive and iterative depth traversal
- Dijkstra’s Algorithm – Shortest path in weighted graphs (non-negative weights)
- Ford–Bellman Algorithm – Shortest paths with support for negative weights
- Floyd–Warshall Algorithm – All-pairs shortest paths
- Kruskal’s Algorithm – Minimum spanning tree using Union-Find structure
- Gradient Descent – Iterative optimization algorithm for minimizing functions
- Double Pointers Technique – Efficient two-pointer algorithm for array problems
- Scanline Algorithm – Line sweep technique for geometry and interval problems
- Euler method – One-step iterative method that approximates the solution of ODEs using the slope at the beginning of each interval; simple but less accurate.
- Runge–Kutta method (RK4) – One-step iterative method that computes slopes at multiple points within each step to achieve higher accuracy; widely used for general-purpose ODE solving.
- Adams method – Multistep method that uses previous points’ slopes (explicit Adams–Bashforth or implicit Adams–Moulton) to predict the next value; efficient and accurate for longer intervals, often initialized with a one-step method.
You can import and test each algorithm individually.