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
- Fixed size: Fixed size
- Variable size: Variable size
Gradually adding the questions in different languages (Python, Julia & C++)
Arrays & Hashing
Two Pointers
Stack
Question | Description | Difficulty | Type | Solution |
---|---|---|---|---|
20. Valid Parenthesis | Determine if the input string has valid parentheses | Easy | Stack |