diff --git a/README.md b/README.md index 507da0b..5c7ca00 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,84 @@ # Data-Structures-Algorithms -The Topics and Algorithms covered in this repository are as follows: +The Topics and Algorithms covered in this repository are as follows, followed by the link to [GeekforGeeks](https://www.geeksforgeeks.org/) reference in the brackets: * Sorting Algorithms - * Merge Sort - * Heap Sort - * Quick Sort + * Merge Sort ([link](https://www.geeksforgeeks.org/merge-sort/)) + * Heap Sort ([link](https://www.geeksforgeeks.org/heap-sort/)) + * Quick Sort ([link](https://www.geeksforgeeks.org/quick-sort/)) * Trees - * Basic operations (Insert, delete) - * BFS (in-order, pre-order, post-order) - * DFS (Level order) - * Left view - * Right view - * Top view - * Bottom view - * Left-bottom view - * Boundary leaves traversal - * Zig-zak traversal - * Spiral traversal - * IsSum tree, IsBST - * Nodes at distance K, distance between nodes - * Lowest common ancestor(LCS) in BST and Btree - * Is symmetric or mirror tree - * Tree from in-order and pre-order/post-order - * BST to DLL - * Btree to DLL -* Linked Lists (SLL, DLL) - * Basic operations(Insert, delete, middle) - * Reverse, K-nodes reverse (Iterative, recursive) - * Incremental K-node reverse - * Check LL is palindrome - * Dutch national flag problem(separate 0's, 1's, 2's) - * Add two number represented in linked lists - * Merge sort on SLL, DLL - * Detect and correct loop in linked list - * Decimal equivalent of binary linked list + * Basic operations (Insert, delete) ([link](https://www.geeksforgeeks.org/binary-search-tree-data-structure/)) + * BFS (in-order, pre-order, post-order) ([link](https://www.geeksforgeeks.org/tree-traversals-inorder-preorder-and-postorder/)) + * DFS (Level order) ([link](https://www.geeksforgeeks.org/dfs-traversal-of-a-tree-using-recursion/)) + * Left view ([link](https://www.geeksforgeeks.org/print-left-view-binary-tree/)) + * Right view ([link](https://www.geeksforgeeks.org/print-right-view-binary-tree-2/)) + * Top view ([link](https://www.geeksforgeeks.org/print-nodes-top-view-binary-tree/)) + * Bottom view ([link](https://www.geeksforgeeks.org/bottom-view-binary-tree/)) + * Bottom-Right view ([link](https://www.geeksforgeeks.org/print-bottom-right-view-of-a-binary-tree/)) + * Boundary leaves traversal ([link](https://www.geeksforgeeks.org/boundary-traversal-of-binary-tree/)) + * Zig-zak traversal ([link](https://www.geeksforgeeks.org/zigzag-tree-traversal/)) + * Spiral traversal ([link](https://www.geeksforgeeks.org/clockwise-spiral-traversal-of-binary-tree/)) + * Check if Sum tree([link](https://www.geeksforgeeks.org/check-if-a-given-binary-tree-is-sumtree/)) + * Check if Binary Search Tree ([link]([link](https://www.geeksforgeeks.org/convert-given-binary-tree-doubly-linked-list-set-3/)) + * Nodes at distance K, distance between nodes ([link](https://www.geeksforgeeks.org/find-distance-between-two-nodes-of-a-binary-tree/)) + * Lowest common ancestor(LCS) in BST and Btree ([link](https://www.geeksforgeeks.org/lowest-common-ancestor-in-a-binary-search-tree/)) + * Is symmetric or mirror tree([link](https://www.geeksforgeeks.org/symmetric-tree-tree-which-is-mirror-image-of-itself/)) + * Tree from in-order and pre-order ([link](https://www.geeksforgeeks.org/construct-tree-from-given-inorder-and-preorder-traversal/)) + * Tree from in-order and post-order([link](https://www.geeksforgeeks.org/construct-a-binary-tree-from-postorder-and-inorder/)) + * BST to DLL ([link](https://www.geeksforgeeks.org/convert-given-binary-tree-doubly-linked-list-set-3/)) + * Btree to DLL ([link](https://www.geeksforgeeks.org/convert-given-binary-tree-doubly-linked-list-set-3/)) +* Linked Lists + * Singly Linked List + * Basic operations(Insert, delete, middle) ([link](http://geeksquiz.com/linked-list-set-2-inserting-a-node/)) + * Reverse, K-nodes reverse (Iterative, recursive) ([link](https://www.geeksforgeeks.org/reverse-a-list-in-groups-of-given-size/)) + * Incremental K-node reverse + * Check LL is palindrome ([link](https://www.geeksforgeeks.org/function-to-check-if-a-singly-linked-list-is-palindrome/)) + * Dutch national flag problem(separate 0's, 1's, 2's) ([link](https://www.geeksforgeeks.org/sort-linked-list-0s-1s-2s-changing-links/)) + * Add two number represented in linked lists ([link](https://www.geeksforgeeks.org/add-two-numbers-represented-by-linked-lists/)) + * Merge sort on SLL ([link](https://www.geeksforgeeks.org/merge-sort-for-linked-list/)) + * Detect and remove loop in linked list ([link](https://www.geeksforgeeks.org/detect-and-remove-loop-in-a-linked-list/)) + * Decimal equivalent of binary linked list ([link](https://www.geeksforgeeks.org/decimal-equivalent-of-binary-linked-list/)) + * Doubly Linked List + * Basic operations(Insert, delete, middle) ([link](https://www.geeksforgeeks.org/doubly-linked-list/)) + * Reverse DLL ([link](https://www.geeksforgeeks.org/reverse-a-doubly-linked-list/)) + * Merge sort on DLL ([link](https://www.geeksforgeeks.org/merge-sort-for-doubly-linked-list/)) + * Circular Linked List + * Basic operations(Insert, delete, traverse) ([link](https://www.geeksforgeeks.org/circular-queue-set-2-circular-linked-list-implementation/)) * Heaps - * Min heap implementation - * Max heap implementation - * Kth min/max in array - * Sort almost sorted array - * Merge K sorted arrays - * Kth largest/smallest element in stream - * Median in stream using two heaps + * Min heap implementation ([link](https://www.geeksforgeeks.org/reverse-a-list-in-groups-of-given-size/)) + * Max heap implementation ([link](https://www.geeksforgeeks.org/reverse-a-list-in-groups-of-given-size/)) + * Kth min/max in array ([link](https://www.geeksforgeeks.org/k-largestor-smallest-elements-in-an-array/)) + * Sort almost sorted array ([link](https://www.geeksforgeeks.org/nearly-sorted-algorithm/)) + * Merge K sorted arrays ([link](https://www.geeksforgeeks.org/merge-k-sorted-arrays-set-2-different-sized-arrays/)) + * Kth largest/smallest element in stream ([link](https://www.geeksforgeeks.org/kth-largest-element-in-a-stream/)) + * Median in stream using two heaps ([link](https://www.geeksforgeeks.org/median-of-stream-of-integers-running-integers/)) * Stacks & queues - * Rotten tomatoes problem - * Check for balanced parenthesis - * Next greater element in the array + * Rotten tomatoes problem ([link](https://www.geeksforgeeks.org/minimum-time-required-so-that-all-oranges-become-rotten/)) + * Check for balanced parenthesis ([link](https://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/)) + * Next greater element in the array ([link](https://www.geeksforgeeks.org/next-greater-element/)) * Next smaller element in the array ([link](https://www.geeksforgeeks.org/next-smaller-element/)) - * Implementing K queues in one array - * Implementing K stacks in one array - * Minimum bracket reversal to balance expression - * Implement two stacks in one array + * Implementing K queues in one array ([link](https://www.geeksforgeeks.org/efficiently-implement-k-queues-single-array/)) + * Implementing K stacks in one array ([link](https://www.geeksforgeeks.org/efficiently-implement-k-stacks-single-array/)) + * Minimum bracket reversal to balance expression ([link](https://www.geeksforgeeks.org/minimum-number-of-bracket-reversals-needed-to-make-an-expression-balanced/)) + * Implement two stacks in one array ([link](https://www.geeksforgeeks.org/implement-two-stacks-in-an-array/)) * Matrix - * Boolean Matrix - * Min/Max cost path in Matrix - * Matrix path exists - * Rotate matrix by 90 degrees - * Spiral traversal of Matrix + * Boolean Matrix ([link](https://www.geeksforgeeks.org/a-boolean-matrix-question/)) + * Min/Max cost path in Matrix ([link](https://www.geeksforgeeks.org/min-cost-path-dp-6/)) + * Matrix path exists ([link](https://www.geeksforgeeks.org/check-possible-path-2d-matrix/)) + * Rotate matrix by 90 degrees ([link](https://www.geeksforgeeks.org/inplace-rotate-square-matrix-by-90-degrees/)) + * Spiral traversal of Matrix ([link](https://www.geeksforgeeks.org/print-a-given-matrix-in-spiral-form/)) * Arrays - * Chocolate distribution problem - * Sliding window problem - * Rain water trapping problem - * Search in Rotated array - * Bus/Train railway platform problem - * Stocks Buy & Sell problem - * Non repeating character in stream + * Chocolate distribution problem ([link](https://www.geeksforgeeks.org/chocolate-distribution-problem/)) + * Sliding window problem ([link](https://www.geeksforgeeks.org/find-subarray-with-given-sum-in-array-of-integers/)) + * Rain water trapping problem ([link](https://www.geeksforgeeks.org/trapping-rain-water/)) + * Search in sorted & rotated array ([link](https://www.geeksforgeeks.org/find-minimum-element-in-a-sorted-and-rotated-array/)) + * Bus/Train railway platform problem ([link](https://www.geeksforgeeks.org/minimum-number-platforms-required-railwaybus-station-set-2-map-based-approach/)) + * Stocks Buy & Sell problem ([link](https://www.geeksforgeeks.org/stock-buy-sell/)) + * Non repeating character in stream ([link](https://www.geeksforgeeks.org/find-first-non-repeating-character-stream-characters/)) * Strings - * Largest number smaller than N with same digits - * Longest common substring in two strings - * Longest palindromic sub-sequence in one string - * Word break problem + * Largest number smaller than N with same digits ([link](https://www.geeksforgeeks.org/find-largest-number-smaller-than-n-with-same-set-of-digits/)) + * Longest common substring in two strings ([link](https://www.geeksforgeeks.org/longest-common-substring-dp-29/)) + * Longest palindromic sub-sequence in one string ([link](https://www.geeksforgeeks.org/longest-palindromic-subsequence-dp-12/)) + * Word break problem ([link](https://www.geeksforgeeks.org/word-break-problem-dp-32/)) * Tries - * Basic operations \ No newline at end of file + * Basic operations (Insert, Search, Display all) ([link](https://www.geeksforgeeks.org/trie-insert-and-search/)) \ No newline at end of file