Data Structures and Algorithm Programs
- Language: Java
- Data Structures & imp classes
- Basic Programs
- Algorithms
- Top Companies (FAANG / MAANG) hiring process
- Companies frequency questions
- Sources
-
- Dynamic int[] Array
- Stream API
- Collections Utility Class
- List
- LinkedList, DoubleLinkedList & CircularLinkedList
- HashMap
- Queue, Dequeue & PriorityQueue
- Stack
- Heap (minHeap & maxHeap)
- IteratorExample — Iterator, ListIterator, Spliterator, Enumeration & ConcurrentModificationException CME
- Binary Search
- BinaryTreeNode sample / example class
- BinaryTree Basics
- Binary Search Tree BST
- Graphs
- Disjoint Set Union DSU / Union Find
- Annotation Type
- Enum Types & Conversions
- Functional Interface
- Record
- Date & Time
- Multi-Threading in Java
- Bit Manipulation
-
- Combination Sum I & Backtracking Intro
- Combination Sum II
- Combination Sum III
- LetterCombinations of a PhoneNumber
- NonContiguousSubArraySum
- Generate Parentheses
- Permutations
- N-Queens
- N-Queens II
- Word Search
- Word Search II
- Subsets
- PalindromePartitioning
- Unique 3-Digit Even Numbers
- Find Unique BinaryString
- Sudoku Solver
- Combinations
-
- Median of Two Sorted Arrays
- Kth Element of Two Sorted Arrays
- Search in Rotated Sorted Array
- Find First and Last Position of Element in Sorted Array
- Search Insert Position
- Search a 2D Matrix
- Find Min in RotatedSortedArray
- Guess Number Higher or Lower
- Successful Pairs of Spells and Potions
- Find Peak Element
- Koko Eating Bananas
- H-Index
-
- Invert Binary Tree
- BinaryTree In-Order Traversal
- Binary Tree Level Order Traversal
- Binary Tree Zigzag Level Order Traversal
- Validate Binary Search Tree
- Same Tree
- Symmetric Tree
- Maximum Depth of Binary Tree
- Construct Binary Tree from Preorder and Inorder Traversal
- Construct Binary Tree from Inorder and Postorder Traversal
- Convert Sorted Array to Binary Search Tree
- Flatten BinaryTree to LinkedList
- Binary Tree Right Side View
- Kth Smallest Element in a BST
- Lowest Common Ancestor of a Binary Tree / LCA of BT
- Lowest Common Ancestor of a Binary Search Tree / LCA of BST
- PathSum III
- Diameter of BinaryTree
- Leaf Similar Trees
- Count Good Nodes in Binary Tree
- Longest ZigZag Path in a Binary Tree
- Maximum Level Sum of a Binary Tree
- Search in a Binary Search Tree
- Delete Node in a BST
- Populating Next Right Pointers in Each Node
- Populating Next Right Pointers in Each Node II
- Path Sum
- Sum Root to Leaf Numbers
- Binary Tree Maximum Path Sum
- Binary Search Tree Iterator
- Count Complete Tree Nodes
- Average of Levels in Binary Tree
- Minimum Absolute Difference in BST
-
- Number of Connected Components in an Undirected Graph
- Number Of Provinces
- Number of Islands
- Find the Index of the First Occurrence in a String
- Redundant Connection
- Accounts Merge
- Number of Operations to Make Network Connected
- Regions Cut By Slashes
- Satisfiability of Equality Equations
- Min Cost to Connect All Points
- Number Of Good Paths
- Longest Consecutive Sequence
- Path With Minimum Effort
- Minimize Hamming Distance After Swap Operations
- Evaluate Division
-
- Maximum SubArray - Kadane's Algorithm & DC
- Maximum Sum Circular Subarray
- Majority Element
- Kth Largest Element In an Array
- Search a 2D Matrix II
- Top K Frequent Elements
- Median of Two Sorted Arrays
- Merge k Sorted Lists
- BinaryTree using PreOrder & InOrder Traversals
- Convert Sorted Array to Binary Search Tree
- Sort List
- Generate Parentheses
- Construct Quad Tree
-
- DP_Recursive_Backtracking Fibonacci
- DP_TopDown_Memoization Fibonacci
- DP_BottomUp_Tabulation Fibonacci
- DP_BottomUp_NoMemory Fibonacci
- DP_Approaches_Progression_Flow 🔥 Unique Paths
- DP_Approaches_Progression_Flow Unique Paths II
- DP_Approaches_Progression_Flow Minimum Path Sum
- DP_Approaches_Progression_Flow Triangle
- DP_Approaches_Progression_Flow Interleaving String
- DP_Approaches_Progression_Flow Edit Distance - Levenshtein Distance Algorithm
- DP_Approaches_Progression_Flow Maximal Square
- State_Machine_DP Best Time to Buy and Sell Stock
- State_Machine_DP Best Time to Buy and Sell Stock II
- State_Machine_DP 🔥 Best Time to Buy and Sell Stock III
- State_Machine_DP Best Time to Buy and Sell Stock IV
- State_Machine_DP Best Time to Buy and Sell Stock V
- State_Machine_DP 🔥 Best Time to Buy and Sell Stock with Cooldown
- State_Machine_DP Best Time to Buy and Sell Stock with Transaction Fee
- Best Time to Buy and Sell Stock using Strategy (not DP problem)
- State_Machine_DP House Robber
- State_Machine_DP Maximum Product SubArray
- State_Machine_DP Domino and Tromino Tiling
- Knapsack_01_DP_SubsetSumProblem & Knapsack 0-1 Intro 🔥
- Knapsack_Bounded_DP_BoundedSubsetSumProblem & Knapsack Bounded Intro
- Knapsack_Unbounded_DP_CoinChange & Knapsack Unbounded Intro
- Knapsack_Fractional_DP_FractionalKnapsackProblem(Weights[], Values[], Capacity) & Fractional Knapsack Problem Intro
- Knapsack_01_DP Partition Equal Subset Sum
- Knapsack_Unbounded_DP Minimum Number of Primes to Sum to Target
- LongestCommonSubsequence
- LongestPalindromicSubstring
- LongestValidParenthesis
- Climbing Stairs
- PascalsTriangle
- Word Break
- LongestIncreasingSubsequence
- PerfectSquares
- Maximum possible stability of any subset of servers
- N-th Tribonacci Number
- Min Cost Climbing Stairs
- JumpGame I
- JumpGame II
-
- Graphs Intro
- Course Schedule - Khan's Algorithm using Topological Sort
- Course Schedule II
- GiftingGroups
- Number of Islands
- Rotting Oranges
- Keys and Rooms
- Number of Provinces
- Reorder Routes to Make All Paths Lead to the City Zero
- Evaluate Division
- Nearest Exit from Entrance in Maze
- Surrounded Regions
- Clone Graph
- Snakes and Ladders
- Minimum Genetic Mutation
- Word Ladder
-
- OptimizingBoxWeights
- MinimumNumberOfSwapsToSort
- JumpGame I
- JumpGame II
- Best Time To Buy And Sell Stock
- Partition Labels
- H-Index
- Gas Station
- Candy
- Maximum SubArray - Kadane's Algorithm & DC
- Maximum Frequency After Subarray Operation
- Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values
- Reorganize String
-
- Group Anagrams
- RansomNote
- Longest Consecutive Sequence
- Two Sum
- SubArraySumEqualsK (contiguous sub-array sum)
- Find the Difference of Two Arrays
- Unique Number of Occurrences
- Determine if Two Strings Are Close
- Equal Row and Column Pairs
- LRU Cache
- Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values
- Analyze User Website Visit Pattern
- Isomorphic Strings
- WordPattern
- ValidAnagram
- HappyNumber
- Contains Duplicates
- Contains Duplicates II
-
- MaximumRepeatingNumber
- Closest Equal Element Queries
- Maximum Unique SubArray Sum After Deletion
- Count Beautiful Numbers
- Minimum Cost to Reach Every Position
- Kids With the Greatest Number of Candies
- Can Place Flowers
- Minimum Pair Removal to Sort Array I
- Increasing Triplet Subsequence
- Count Special Quadruplets
- Count Good Triplets
- Merge Sorted Array
- Remove Element
- Remove duplicates from Sorted Array
- Remove duplicates from Sorted Array II
- Rotate Array by K times
- H-Index
- Insert Delete GetRandom O(1)
- Summary Ranges
- Maximum Distance in Arrays
-
- MiddleOfTheLinkedList
- Reverse LinkedList
- Reverse LinkedList 2
- Zipper LinkedLists
- Add Two Numbers
- Remove Nth Node From End of List
- Merge Two Sorted Lists
- Merge k Sorted Lists
- Swap Nodes In Pairs
- Reverse Nodes in k-Group
- Copy List with Random Pointer
- LinkedListCycle
- LinkedListCycle 2
- Sort List
- LRU Cache
- Intersection of Two LinkedLists
- Palindrome LinkedList
- Delete the Middle Node of a Linked List
- Odd Even Linked List
- Maximum Twin Sum of a Linked List
- Remove Duplicates from Sorted List
- Remove Duplicates from Sorted List II
- Rotate List
- Partition List
-
- Range Sum Query - Immutable & PrefixSum intro
- SubArraySumEqualsK (contiguous sub-array sum)
- ContiguousBinaryArray
- Find the Highest Altitude
- Find Pivot Index
- Product of Array Except Self
- Maximum SubArray - Kadane's Algorithm & DC
- Maximum Sum Circular Subarray
- Best Time to Buy and Sell Stock using Strategy
-
- Maximum Average SubArray I & Fixed Sliding Window Intro
- Longest Substring Without Repeating Characters & Dynamic Sliding Window Intro
- Find all the Anagrams in a String
- Minimum Window Substring
- Sliding Window Maximum
- Maximum Number of Vowels in a Substring of Given Length
- Max Consecutive Ones
- Max Consecutive Ones II
- Max Consecutive Ones III
- Longest SubArray of 1's After Deleting One Element
- Minimum Size Subarray Sum
- Substring with Concatenation of All Words
- Best Time to Buy and Sell Stock using Strategy
-
- Parentheses perfection kit
- Binary String to Palindrome
- Longest Common Prefix
- Longest Palindrome After Substring Concatenation I
- Merge Strings Alternately
- Greatest Common Divisor of Strings
- Reverse Vowels of a String
- Reverse Words in a String
- String Compression
- Zigzag Conversion
- Roman to Integer
- Integer to Roman
- Length of Last Word
- Text Justification
- Longest Common Prefix Between Adjacent Strings After Removals
- Process String with Special Operations I
- Hiring Process
- Check out my "Amazon Interview Process" personal Google Keep notes
- LeetCode Amazon top questions
- GitHub - xizhang20181005/Leetcode_company_frequency #amazon
- Hiring Process
- LeetCode Google top questions
- GitHub - xizhang20181005/Leetcode_company_frequency #Google
- Hiring Process
- LeetCode Microsoft top questions
- GitHub - xizhang20181005/Leetcode_company_frequency #Microsoft
- Hiring Process
- LeetCode Meta / Facebook top questions
- GitHub - xizhang20181005/Leetcode_company_frequency #Facebook
- From my LeetCode experience- leetcode/srinivasvadige
- Hackerrank
- Personal experience and research
- Official java documentations, blogs
- WilliamFiset - YT Data structures playlist
- takeuforward.org - Strivers A2Z DSA Course/Sheet
- COURSERA DSA ROADMAP PART 1
- COURSERA DSA ROADMAP PART 2
- GFG DSA course
- FCC DSA course with 48hrs YT video
- GFG interview DSA FAQs
- Columbia University DSA Research Papers
Author: Srinivas Vadige
Email: srinivas.vadige@gmail.com
LinkedIn: linkedin.com/in/srinivasvadige
My Leetcode profile: leetcode.com/srinivasvadige
This repository is released under the MIT license. In short, this means you are free to use this software in any personal, open-source or commercial projects. Attribution is optional but appreciated.