Hi, I'm shivam chaturvedi
Backend Developer | Frontend for fun | Passionate Programmer

My Skills










Recent Projects
Check out some of my latest projects.
Recent Blogs
Check out my latest blog posts.

Splay Tree: Implementation and Usage
Shivam Chaturvedi • 2024-08-17
5 min readA Splay Tree is a self-adjusting binary search tree where recently accessed elements are moved closer to the root. This dynamic balancing improves access times for frequently used nodes. In this blog, we explore the key features of Splay Trees, their use cases, and provide a simple C++ implementation showcasing operations such as insertion, searching, and tree rotations. Discover how Splay Trees maintain efficiency in handling non-uniform access patterns.

AVL Trees: Implementation and Usage
Shivam Chaturvedi • 2024-08-17
10 min readAn AVL Tree is a self-balancing binary search tree where the difference in heights of left and right subtrees (known as the balance factor) cannot be more than one for any node. This balancing ensures O(log n) time complexity for search, insertion, and deletion operations.

All About Graphs In Data Structures
Shivam Chaturvedi • 2024-08-17
15 min readGraphs are fundamental structures used to model pairwise relations between objects. They consist of nodes (vertices) and edges (connections between nodes). Graphs are used in various applications, from computer networks and social networks to recommendation systems and route planning.
Code Snippets
Check out some of my code implementations.
Graph Implementation using Adjacency List in C++
Created at : Sat Aug 17 2024This C++ code implements a graph using an adjacency list representation. The graph can be either directed or undirected, and supports operations like adding edges, performing depth-first search (DFS), and breadth-first search (BFS). The adjacency list is efficient in terms of space, storing only the neighbors of each vertex, making it well-suited for sparse graphs. This implementation is widely used in various algorithms, including those for pathfinding, connectivity, and traversal.
View CodeBinary Search Tree Implementation in C++
Created at : Sat Aug 17 2024This C++ code provides a simple implementation of a Binary Search Tree (BST), supporting core operations like insertion, searching, and in-order traversal. The tree maintains an ordered structure, where the left child of a node contains values smaller than the node, and the right child contains values greater or equal. BSTs offer efficient data management, making them essential for various algorithms and applications.
View CodeAVL Tree Implementation in C++
Created at : Sat Aug 17 2024This C++ code implements an AVL Tree, a self-balancing binary search tree where the height difference (balance factor) of the left and right subtrees is maintained to be at most one. The tree supports operations like insertion, deletion, and searching while automatically performing rotations to maintain balance. By keeping the tree balanced, AVL Trees ensure efficient operations with guaranteed O(log n) time complexity for search, insert, and delete operations, making them ideal for applications where balanced data access is critical.
View Code