Data-Structure-and-Algorithms
Java Solution for Data Structures and Algorithms.
Star the Repo for quick view
Fork the Repo if you want to contribute to it
USING THE CODE
BEFORE RUNNING ANY OF THE CODE REMOVE (package) THIS FROM THE TOP OF THE CODE
package SummerTrainingGFG.______;
CONTENT
1. ARRAYS
- Equilibrium Point
- Frequencies Of Limited Range Array Elements
- Leaders In Array
- Max Occurred Integer
- Min Adjacent Difference Circular Array
- Prefix Sum Array
- Reverser Array In Group
- Rotate Array
- Smallest Positive Missing Number
- Strongest Neighbour
- Wave Array
- Binary To Gray
- Check Kth Bit Set Or Not
- Check Power Of Two
- Count Set Bits
- Divide And Multiply
- First Bit From Right
- Flip Bits
- Log Base2
- Longest Consecutive Ones
- Missing Number
- MSB
- One Odd Occuring
- Set Bit
- Swap Numbers
- Toggle Bits
- Unset
3. CONTEST
- Boolean Matrix Problem
- Conversion To One
- Get The Shadow
- K Sum
- Kth Smallest Difference
- Nearest Perfect Square
- Toggle The Middle
- Without Adjacent
- X O R Pair
5. MATHEMATICS
7. RECURSION
- Josephus Problem
- Possible Words From Phone Digits
INCOMPLETE
- Rod Cutting
- String Palindrome
- Subset Of String
- Subset Sum Array
- Tower Of Hanoi
8. SEARCHING
- Find Floor
- Left Most Index
- Majority Element
- Occurrence Count Of Element
- Peak Elements
- Sorted Rotated Array Search
- Square Root
- Two Pointer Approach
9. SORTING
- Chocolate Distribution
- Count Inversion In Array
- Intersection Of Two Sorted Array
- Kth SmallestE lement
- List Type Array
- Merge Overlapping Intervals
- Merge Two Sorted Array
- Normal Array
- Quick Sort Using Hoare Partition
- Quick Sort Using Lomuto Partition
- Segregate Element Of Three Type
- Segregate Elements Of Two Type
- Union Of Two Sorted Array
- Cycle Sort
- Counting Sort
- Radix sort
- Bucket sort
10. MATRIX
- Snake Pattern
- Spiral Traversal
- Search in Matrix Rows Sorted Column Sorted
- Add Matrix
- Boolean Matrix Problem
11. HASHING
- Check Two Arrays Equal
- Count Distinct Element In Every Window
- Count Distinct Elements
- Count Non Repeated Elements
- First Repeating Element
- Frequency Of Array Elements
- Insertion Of Array
- Longest Common Span Two Binary Array
- Longest Common Subsequence
- Longest Sub Array With Given Sum
- Pair With Sum X
- Print Non Repeated Elements
- P_ Hash Map
- P_ Hash Set
- Separate Chaining
- Sub Array With Given Sum
- Sub Array With Zero Sum
- Union Of Array
12. STRINGS
- Check Anagram
- Check Panagram
- Isogram Words
- Keypad Typing
- Left Most Repeating
- Lexicographic Rank Problem
- Permutation Of Pattern Exist
- Rotation Of String Or Not
- Sum Of Number In String
13. LINKEDLIST
- Delete Alternate
- Doubly Linked List
- Middle Of Linked List
- Nth Pointer From E Nd
- Rm Duplicate Sorted
- Singly Linked List
- Split Alternatingly
- Union Intersection
14. STACK
- Array Implementation
- Balanced Parenthesis
- Delete Mid Of Stack
- Eval Postfix
- Get Min
- Get Min At Pop
- Histogram1
- Histogram2
- Infix To Postfix
- K Stack In Array
- Largest Rectangular Area
- Linked List Stack
- Next Greater
- Previous Greater
- Remove Consecutive Duplicates
- Remove Consecutive Duplicates2
- Stock Span
- Two Stacks In An Array
15. QUEUE
16 DEQUE
17 TREE
- Binary Tree Implementation
- Height Of Binary Tree
- Level Order Traversal
- Lowest Common Ancestor
- Max In Binary Tree
- Print Left View
- Print Node At Dist K
- Size Of Binary Tree
- Tree Traversal
- B S T
- B S T Element In Range
- B S T Nodes In Range
- Check B S T
- Closest Element In B S T
- Fix Two Nodes
- Floor In B S T
- Level Order To B S T
- Lowest Common Ancestor
- Pair Sum B S T
- Top View
- Vertical Traversal
19 HEAP
- Heap
- Heap Sort
- K Closest Element
- Kth Largest In A Stream
- Median Of Stream
- Merge K Sorted Arrays
- Print K Largest Elements
- Priority Queue Demo
- Purchasing Max Items
- Sort K Sorted Array
20 GRAPH