- Notifications
You must be signed in to change notification settings - Fork17
azmalshaikh/Data-Structure-and-Algorithms
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
All DS & Algorithms are implemented in Java (for educational purposes)
- ArrayList
- LinkedList
- Vector & Stack
- Queue
- Deque
- Map
- HashCode & Equals
- Comparators & Comparable
- Tree
- Graph
- Priority Queue
- Trie
- Segment Tree
- Arrays
- Anagram OccurrenceGFG
- Coins Of Geekland
- K Sorted ArrayGFG
- Maximum Sum Subarray of size kGFG
- Min Subsets with Consecutive NumbersGFG
- Smallest Positive Number that cannot be represented as Sum
- Geek ClassmatesGFG
- Majority ElementGFG
- Replace 0's With X'sGFG
- Triplet SumGFG
- Longest Consecutive SequenceGFG
- Kadane's AlgorithmGFG
- Best time to buy and sell stocks - lLeetCode
- Best time to buy and sell stocks - llGFG
- Trapping Rain WaterGFG
- Container with Most WaterLeetCode
- Majority Element 2LeetCode
- Majority Element GeneralPepCoding
- Next Greator ElementLeetCode
- Max ChunksGFG
- String MultiplicationLeetCode
- Pascal's TriangleLeetCode
- Next PermutationGFG
- Partition LabelLeetCode
- Sorting
- BinarySearch
- Search Element using Binary SearchGFG
- Ceil and Floor in array
- Book AllocationGFG
- Find Element in Infinite Sorted ArrayGFG
- Matrix SearchGFG
- Min Number in sorted rotated arrayGFG
- Missing Element of APGFG
- Pivot Element in sorted rotated array
- Search in rotated arrayGFG
- Ternary SearchGFG
- Double HelixSPOJ
- Factorial NumberGFG
- String
- Bit Manipulation
- Basic Concepts
- Power of 2GFG
- Power SetGFG
- Rightmost Different BitGFG
- Subset
- Bit DifferenceGFG
- Bleak NumberGFG
- Count Set BitsGFG
- Grey CodeGFG
- Minimum XOR PairsGFG
- Calculate square of a number without using *, / and pow()GFG
- Reverse BitsGFG
- Is Binary Number Multiple of 3GFG
- UTF-8GFG
- Sum of XOR of all pairsGFG
- Same no of set bits as that of nGFG
- Reduce a Number to 1 in Minimum StepsGFG
- Power SetGFG
- Find the n-th number whose binary representation is a palindromeGFG
- Find Missing And RepeatingGFG
- Copy Set BitsGFG
- Divide two integersLeetCode
- Print Abbravations
- Swap all odd and even bitsGFG
- Nqueen
- Solve SodukuGFG
- Recursion
- Basic
- FloodFill
- CoinMax
- Permutations
- Coin Toss
- Climbing Stairs
- Generate ParenthesesLeetCode
- Letter Combination Of Phone NumerLeetCode
- Palindrome PartitioningLeetCode
- Reverse String
- Palindrome Check
- Subsequence of a String
- Tower Of HanoiGFG
- Path In Maze
- Josephus problemGFG
- HandshakesGFG
- Happy NumberGFG
- Print N-bit binary numbers having more 1s than 0sGFG
- BackTracking
- Maze BlockGFG
- Partition An Array
- Shortest Path In Maze
- SubsetLeetCode
- Word SearchLeetCode
- Black and WhiteGFG
- Combination SumGFG
- Partition array to K subsets (Print all subsets)
- Rat Maze with Multiple JumpsGFG
- Solve SodukuGFG
- Largest Number in K SwapsGFG
- N Queen ProblemGFG
- K Length WordsGFG
- Knights TourGFG
- Kth PermutationGFG
- Remove Inavlid ParenthesesLeetCode
- Word BreakGFG
- Word PatternGFG
- Tug Of WarGFG
- Permutations (Two Methods)PepCoding
- Combinations (Two Methods)PepCoding
- Queen PermutationPepCoding
- Queen CombinationPepCoding
- K Length WordsPepCoding
- CrossWord PuzzlePepCoding
- N Queen Branch and BoundPepCoding
Mathematice For CP
Dynamic Programming
- Fibonacci-dpGFG
- Climb StairsGFG
- Climb Stairs With Variable JumpsGFG
- Climb Stairs With Minimum MovesGFG
- Min cost In Maze TraversalGFG
- GoldmineGFG
- Target Sum Subsets - DPGFG
- Coin Change CombinationsGFG
- Coin Change PermutationsGFG
- Zero One KnapsackGFG
- Unbounded KnapsackGFG
- Count Binary StringsGFG
- Arrange BuildingsGFG
- Count EncodingsGFG
- Count A+B+C subsequencesGFG
- Maximum Sum Non Adjacent ElementsGFG
- Paint HouseGFG
- Paint House-Many colorsGFG
- Paint FenceGFG
- Tiling with 2*1 TilesGFG
- Tiling with M*1 TilesGFG
- Friends PairingGFG
- Partition Into SubsetsGFG
- Buy & Sell Stock - CooldownGFG
- Buy and Sell Stocks- Two Transactions AllowedGFG
- Buy and Sell Stocks- K Transactions AllowedGFG
- Longest increasing subsequenceGFG
- Max Non Overlapping BridgesGFG
- Catalan NumbersGFG
- Number Of Bsts MediumGFG
- Count Of Valleys And Mountains EasyGFG
- Count Brackets EasyGFG
- Circle And Chords EasyGFG
- Number Of Ways Of Triangulation EasyGFG
- Catalan Numbers VariationGFG
- Count Palindromic substringGFG
- Longest Palindromic substringGFG
- 2 keys keyboardGFG
- Min SquaresGFG
- Longest Common SubsequenceGFG
- Longest Palindromic SubsequencesGFG
- Count Palindromic subsequencesGFG
- Count Distinct SubsequencesGFG
- Count Distinct Palindromic SubsequencesGFG
- Wildcard Pattern MatchingGFG
- Regular Expression MatchingGFG
- Min Score of triangulationGFG
- Rod CuttingGFG
- Min Palindrome CutGFG
- Matrix Chain MultiplicationGFG
- Boolean ParenthesizationGFG
- Optimal Binary Search TreeGFG
- Burst BalloonsGFG
- Longest Common SubstringGFG
- Longest Repeating SubsequenceGFG
- Minimum Ascii Delete Sum For Two StringsGFG
- Shortest uncommon subsequenceGFG
- Distinct TransformationsGFG
- Probability Of Knight In The Chessboard MediumGFG
- Edit DistanceGFG
- Kadane's AlgorithmGFG
- K ConcatenationGFG
- Maximum Sum Subarray With At Least K ElementsGFG
- Numeric KeypadGFG
- Maximum Difference Of Zeros And Ones In Binary StringGFG
- Maximum Sum Of Two Non-overlapping SubarraysGFG
- Optimal Strategy For A GameGFG
- Maximum Sum Of Three Non-overlapping SubarraysGFG
- Maximum Sum Of M Non-overlapping SubarraysGFG
- Floor TilingGFG
- Cherry PickupGFG
- Arithmetic Slices 1GFG
- Arithmetic Slices 2GFG
- Largest Square Sub-matrix With All 1'sGFG
- Word BreakGFG
- Ugly NumberGFG
- Super Ugly NumberGFG
- Find Water In GlassGFG
- Frog JumpGFG
ArrayList
LinkedList
- Reverse a LLGFG
- Rearrange LL in placeGFG
- Sorted insert for LLGFG
- Sorted insert for CLLGFG
- Sorted insert for DLLGFG
- Absolute List SortingGFG
- Detect loopGFG
- Remove loopGFG
- Intersection point in Y shaped LLGFG
- Reverse a LL in groups of size KGFG
- Count TripletsGFG
- Intersection of two sorted LLGFG
- Union of two LLGFG
- Add 1 Number in LinkedListGFG
- Add Two LinkedListGFG
- Split a circular LiinkedList into two halvesGFG
- Mutliply two LinkedListGFG
- Multiply two LinkedList 2GFG
- Quick Sort on LinkedListGFG
- Quick Sort on DoublyLinkedListGFG
- Merge Sort on LinkedListGFG
- Flatten a LinkedListGFG
- Remove Duplicates from an unsorted LinkedListGFG
- LinkedList is PalindromeGFG
- Pairs with Given Sum in DoublyLinkedListGFG
- Sort a LinkedList containing 0's, 1's and 2'sGFG
- Clone a LinkedListGFG
- Merge k sorted LLGFG
- Design LRU CacheGFG
- Reverse In RangeLeetCode
Vector & Stacks
- Parenthesis CheckerGFG
- Celebrity ProblemGFG
- Restrictive Candy CrushGFG
- Stack using two QueuesGFG
- Valid SubstringGFG
- Maximum Rectangular Area in a HistogramGFG
- Infix EvaluationGFG
- Infix ConversionGFG
- Postfix EvaluationGFG
- Postfix Conversion
- Prefix Conversion
- Patten FollowingGFG
- Next greator ElementGFG
- Implemennt K stacksGFG
- Score of ParenthesesLeetCode
- Min Remove to make parestheses validLeetCode
- Asteroid CollissionLeetCode
- Remove Duplicate lettersLeetCode
- Online Stock SpanLeetCode
- Exclusive time of finctionsLeetCode
- 132 patternLeetCode
- Remove K digitsLeetCode
- Basic CalculatorLeetCode
- Next Gretor Element IILeetCode
Queue
HashMap
- Map ImplementationPepCoding
- Array Pair Sum DivisibilityGFG
- Count Distinct element in every window of size kGFG
- Find Number of Employees under every employeeGFG
- Find Itinerary from a given list of ticketsGFG
- Largest Subarray with sum kGFG
- Largest Subarray with sum 0GFG
- Count total no of subarrays with sum kLeetCode
- Count total no of subarrays with sum zeroGFG
- Largest Subarray with contigous elementsGFG
- Smallest window in string containing all the charactersGFG
- Smallest window that contains all characters of string itselfGFG
- Length of the longest substring having all unique charactersGFG
- Count of substring having all unique charactersGFG
- Longest substring with exactly k unique charactersGFG
- Count of Equivalent SubarraysGFG
- Maximum Consecutive OnesLeetCode
- Longest Substring With At Most K Unique CharactersPepCoding
- Count of Substring With At Most K Unique CharactersPepCoding
- K AnagramsGFG
- Group Shifted StringsGFG
- Isomorphic StringsGFG
- Word PatternLeetCode
- Longest Subarray with equal no of 0's and 1'sGFG
- Count of Subarray with equal no of 0's and 1'sPepcoding
- Longest Subarray With Sum Divisible By KGFG
- Count of Subarray With Sum Divisible By KGFG
- Longest Subarray With Equal Number Of 0s 1s And 2sPepCCoding
- Count of Subarray With Equal Number Of 0s 1s And 2sGFG
- Pairs with Equal sumPepCoding
- Simple FractionGFG
- Rabbits in the ForestLeetCode
- Arithmetic SequenceLeetCode
- Smallest Subarray With All Occurrences Of The Most Frequent ElementGFG
- Double Pair ArrayLeetCode
- Maximum Points on the lineLeetCode
- Quadruplet Sum 1LeetCode
- Quadruplet Sum 2LeetCode
- Frequency Game
- Group AnagramsGFG
- Ruling PairGFG
- Sort and array according to otherGFG
Heap
Trees
- Generic Tree
- Implementation
- Level Order TraversalPepCoding
- Level Order Traversal (Line by Line)PepCoding
- Level Order Traversal (Zig Zag)PepCoding
- Remove LeavesPepCoding
- Linearize TreePepCoding
- Linearize Tree in O(n)PepCoding
- Node to Root PathPepCoding
- Lowest Common AncestorPepCoding
- MultisolverPepCoding
- Predecessor and SuccessorPepCoding
- Ceil And FloorPepCoding
- Kth Largest ElementPepCoding
- Node with Max Subtree SumPepCoding
- DiameterPepCoding
- Iterative Preorder And PostorderPepCoding
- Binary Tree
- Implementation
- Level Order Traversal (Line by Line)LeetCode
- Level Order Traversal (Spiral Form)GFG
- Nodes at given distance from rootGFG
- Node to Root PathGFG
- Node k distance away Two MethodsGFG
- Diameter Of Binary TreeGFG
- Tree is BST or notGFG
- Balanced TreeGFG
- Largest BST SubtreeGFG
- Min No of CameraLeetCode
- House RobberyGFG
- Longest ZigZag pathLeetCode
- Validate BST Using InorderGFG
- Fix two Node of BSTGFG
- Left ViewGFG
- Right ViewGFG
- Top ViewGFG
- Bottom ViewGFG
- Vertical Order TraversalLeetCode
- Vertical Order Traversal (M-2)LeetCode
- Diagonal TraversalGFG
- Vertical Order Traversal With a constraintPepCoding
- Searialize and DeserializeLeetCode
- Diagonal Order Sum using dfsGFG
- Inorder Morris TraversalGFG
- Preorder Morris TraversalGFG
- Lowest Common AncestorLeetCode
- Max Path Sum between two LeavesGFG
- Max Path Sum between two NodeGFG
- Construct BT Using Inorder and PreorderGFG
- Construct BT Using Inorder and PostorderGFG
- Construct BT Using Preorder and PostorderGFG
- Construct BT Using Inorder and LevelorderGFG
- Validate BST Using Morris TraversalGFG
- Make BT Fron LLGFG
- Print BT levels in Sorted OrderGFG
- Check Tree TraversalGFG
- Corona VaccineGFG
- Inorder, Preorder and Postorder Using Iterative Approach
- Burning Tree 1GFG
- Burning Tree 2GFG
- Max Width of Binary TreeGFG
- Symmetric TreeGFG
- Valentine SumGFG
- Binary Search Tree
- Generic Tree
Graph
- ImplementGFG
- bfsGFG
- dfsGFG
- Connected ComponentsGFG
- No of IslandsGFG
- Hamiltonian PathGFG
- Detect Cycle Undirected using bfs and dfsGFG
- Detect Cycle Directed using dfsGFG
- Bipartite Graph using bfs and dfsGFG
- Topological Sort using dfsGFG
- Topological Sort using bfs kahn's AlgoGFG
- Graph Cyclic Directed using bfs (Kahn's Algo)GFG
- Shortest path in directed acyclic graphGFG
- Dijkstra's AlgoGFG
- Prims AlgoGFG
- Disjoint SetsGFG
- Detect Cycle using Disjoint SetsGFG
- Kruskals AlgoGFG
- DFS vs DSUGFG
- Bellman Ford Algo (Detect Negative Weight Cycle)GFG
- Coloring a BorderGFG
- Number Of Distinct Island MediumGFG
- 01 MatrixGFG
- Rotten OrangesGFG
- Bus RoutesGFG
- Sliding PuzzleGFG
- Min swaps to sort an arrayGFG
- Minimum edges to reverse to make path from a source to a destinationGFG
- Alien DictionaryGFG
- Optimize Water DistributionGFG
- Swim in rising waterGFG
- Kosaraju AlgoGFG
- Mother VertexGFG
- Articulation pointGFG
- Bridges in graphGFG
- Remove Max Number of Edges to Keep Graph Fully TraversableGFG
- No of islands 2GFG
- Regions cut by slashesGFG
- Eulerian Path and circuitGFG
- Reconstruct ItineraryGFG
- Redundant Connection 1 and 2(Imp)GFG
- Satisfiability Of Equality EquationGFG
- Sentence SimilarityGFG
About
DSA in java
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published