Data structure and Algorithms - Java Array 1. Find two numbers that add up to "n" 2. Find a duplicate element in an array 3. Find the first non-repeating integer in an array 4. Merge two sorted arrays 5. Find Minimum Value in Array 6. Array of products of all elements except itself 7. Rearrange Sorted Array in Max/Min Form 8. Re-arrange positive and negative values in array 9. Remove even elements from an array 10. Right rotate the array by one index 11. Find the second maximum value in an array 12. Swap every pair of alternate elements in the array 13. Adding ones and printing the array after k updates are done 14. Find Duplicate Elements from an array in linear time 15. Sort an array of 0s, 1s and 2s 16. Lemonade change problem 17. Check if the array is sorted and rotated 18. Find a maximum repeated element in an array 19. Print all unique elements from an array 20. Check if two arrays are equal or not 21. Find the missing number in an array 22. Remove duplicate elements from sorted array 23. Find the index where the target would be if it were inserted in order 24. Find Duplicate Number from an array in linear time 25. Remove all occurrences of val in given array in-place Linked List 1. Implement Singly Linked List & perform Basic operations 2. Implement Doubly Linked List & perform Basic operations 3. Remove Duplicates from a Linked List 4. Union of lists 5. Intersection of Lists 6. Find the middle node of a linked list 7. Return the Nth node from the end 8. Find if a doubly linked list is a Palindrome 9. Determine if the linked list has a cycle in it 10. Delete all duplicates such that each element appears only once and Return the sorted linked list 11. Check if a given number is a happy number or not using fast and slow pointer Stack 1. Implement Stack using Array 2. Implement Stack using Linked List 3. Implement Stack using Queue 4. Sort the values in a Stack 5. Check whether the pairs and the orders of {,},(,),[,] are correct in expression 6. Check if given strings are equal when both are typed into empty text editors. '#' means a backspace character Queue 1. Implement Queue using Array 2. Implement Queue using Linked List 3. Implement Queue using Stack 4. Generate Binary Numbers from 1 to n using Queue 5. Sliding Window Maximum Graph 1. Implement Graph using Adjacency List 2. Implement Graph using Adjacency Matrix 3. Breadth First Search 4. Depth First Search 5. Cycle Detection in Undirected Graph using BFS 6. Cycle Detection in an undirected graph using DFS 7. Find the distance of the nearest 1 in the grid for each cell 8. Flood Fill algorithm to replace the color of all the aforementioned pixels with new color 9. Find the number of enclaves (land cells) 10. Find the number of provinces (A province is a group of directly or indirectly connected cities and no other cities outside of the group) 11. Calculate the minimum time required to rot all oranges 12. Surrounded Regions Problem (Replace all ‘O’ with ‘X’ that is surrounded by ‘X’) 13. Find the length of the shortest transformation sequence from startWord to targetWord String 1. Check if a given string can be constructed by taking a substring of it and appending multiple copies of the substring together 2. Find a binary string of length n that does not appear in given array 3. Check if given string 't' is an anagram of another string 's' 4. Check if a phrase is a palindrome or not, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters 5. Count number of vowels, consonants, spaces in String 6. Find the first non-repeating character in a given string and return its index 7. Find the extra added letter by comparing two strings 8. Return a substring of num with length 3 which consists of only one unique digit 9. Redistribute characters to make equal strings 10. Reverse the order of characters in each word within a sentence 11. Sort vowels in the non-decreasing order of their ASCII values, All consonants should remain in their original places Recursion 1. Check if an array is sorted or not using recursion 2. Find the factorial of a given number using recursion 3. Find the power of a given number using recursion 4. Print numbers in ascending and descending using recursion 5. Find the sum of array elements using recursion 6. Find Nth Fibonacci number using recursion 7. Print Fibonacci series for given number 8. Remove X from a given string using recursion Searching Algorithms 1. Linear Search 2. Binary Search i. Find ceil of a given number ii. Find the target in the mountain array iii. Find pivot in sorted rotated array iv. Find the target in the mountain array v. Order agnostic binary search Sorting Algorithms 1. Selection Sort 2. Insertion Sort 3. Bubble Sort