Documenting practices on various coding platforms such as LeetCode, Kattis, HackerRank, etc. Additionally, adding code snippets to show how to implement certain data structures and algorithms (DSA) from scratch.
Sorting
∏Category | Algorithm | Description | Implementation Link |
---|---|---|---|
Comparison-based | Bubble Sort | Simple comparison-based sorting | Bubble Sort |
Comparison-based | Insertion Sort | Builds the final sorted array one item at a time | Insertion Sort |
Comparison-based | Selection Sort | Selects the smallest element from an unsorted list in each iteration and places that element at the beginning | Selection Sort |
Comparison-based | Merge Sort | Divides the array into halves, sorts them and merges them back together | Merge Sort |
Comparison-based | Quick Sort | Divides the array into partitions and sorts them recursively | Quick Sort |
Comparison-based | Random Quick Sort | Uses a random pivot to divide the array into partitions and sorts them recursively | Random Quick Sort |
Non-comparison-based | Bucket Sort | Distributes elements into buckets and sorts each bucket individually | Bucket Sort |
Non-comparison-based | Counting Sort | Counts the number of objects having distinct key values and uses arithmetic to determine the positions of each key | Counting Sort |
Non-comparison-based | Radix Sort | Sorts numbers by processing individual digits | Radix Sort |
Arrays
Stack and Queue
HashMap / Hash Table
Direct Addressing Table (simplified hash table)
Graph
Single-Source Shortest Path: Bellman Ford
Single-Source Shortest Path: Dijkstra
Single-Source Shortest Path: BFS on unweighted graph
Single-Source Shortest Path: Modified Dijkstra
Kadane's Algorithm
Sliding Window
Prefix Sum
Two Pointers
Gradually adding the questions in different languages (Python, Julia & C++)
Arrays & Hashing
Two Pointers
Stack
Sliding Window
Linked List
Question | Description | Difficulty | Type | Solution |
---|---|---|---|---|
21. Merge Two Sorted Lists | Merge two sorted linked lists and return it as a new sorted list | Easy | Linked List | ![]() ![]() |