How 5hraddhab/dsa works
This repository is a collection of standalone C++ algorithm examples, not a single application. Its principal user-to-result pattern is to provide an input to an individual solution or demonstration and obtain a computed result or traversal output. The examples cover array and string problems, trees and linked lists, graph traversal, recursion, and stack/queue implementations. They do not show shared runtime orchestration or calls between examples, so the graph groups independent components without inventing a pipeline. Relationships are omitted because no inter-component calls are evidenced.
Components 34
Arrays and Strings
- Two Sum
1-two-sum/two-sum.cpp - Pascal Triangle
118-pascals-triangle/pascals-triangle.cpp - Pascal Row
119-pascals-triangle-ii/pascals-triangle-ii.cpp - Stock Profit
121-best-time-to-buy-and-sell-stock/best-time-to-buy-and-sell-stock.cpp - Longest Consecutive
128-longest-consecutive-sequence/longest-consecutive-sequence.cpp - Majority Element
169-majority-element/majority-element.cpp - Four Sum
18-4sum/4sum.cpp - Truck Units
1829-maximum-units-on-a-truck/maximum-units-on-a-truck.cpp - Majority Element II
229-majority-element-ii/majority-element-ii.cpp - Single Number III
260-single-number-iii/single-number-iii.cpp - Find Duplicate
287-find-the-duplicate-number/find-the-duplicate-number.cpp - Next Permutation
31-next-permutation/next-permutation.cpp - Missing and Repeated
3227-find-missing-and-repeated-values/find-missing-and-repeated-values.cpp - Rotate Image
48-rotate-image/rotate-image.cpp - Maximum Subarray
53-maximum-subarray/maximum-subarray.cpp - Subarray Sum
560-subarray-sum-equals-k/subarray-sum-equals-k.cpp - Set Matrix Zeroes
73-set-matrix-zeroes/set-matrix-zeroes.cpp - Binary Search
792-binary-search/binary-search.cpp - String to Integer
8-string-to-integer-atoi/string-to-integer-atoi.cpp - Merge Sorted Arrays
88-merge-sorted-array/merge-sorted-array.cpp
Trees and Lists
- Tree Max Depth
104-maximum-depth-of-binary-tree/maximum-depth-of-binary-tree.cpp - Maximum Tree Path
124-binary-tree-maximum-path-sum/binary-tree-maximum-path-sum.cpp - Linked List Cycle
141-linked-list-cycle/linked-list-cycle.cpp - List Intersection
160-intersection-of-two-linked-lists/intersection-of-two-linked-lists.cpp - Kth BST Value
230-kth-smallest-element-in-a-bst/kth-smallest-element-in-a-bst.cpp - Delete BST Node
450-delete-node-in-a-bst/delete-node-in-a-bst.cpp - Search BST
783-search-in-a-binary-search-tree/search-in-a-binary-search-tree.cpp - Insert BST
784-insert-into-a-binary-search-tree/insert-into-a-binary-search-tree.cpp - Validate BST
98-validate-binary-search-tree/validate-binary-search-tree.cpp
Graph Algorithms
- Breadth-First Search
GRAPH/BFS.cpp - Depth-First Search
GRAPH/DFS.cpp - Graph Creation
GRAPH/graphcreation.cpp
Recursion
- Permutations
46-permutations/permutations.cpp - Power Function
50-powx-n/powx-n.cpp