This repository contains various Java codes for solving common and interview programming problems along with problem statemets.
Please give a ⭐ if you like my work!
Note: This repository keeps on updating with new codes and problems, so stay tuned to it!
No. of Questions Solved: 57
- Chocolate Box Problem
- Counting Sort
- Contains Duplicate
- Efficient Contains Duplicate
- Finding the Common Element
- Longest Common Prefix
- Maximum and Minimum Element in an Array
- Maximum Sum of Subarray
- Number of Good Pairs
- Pair with a Difference
- Postfix Expression Evaluation
- Remove Consecutive Characters
- Reversing an Array
- Searching in an array where adjacent differ by at most k
- Search in Rotated Sorted Array
- Stack Using Two Queues
- Sort Array By Parity
- Two Stacks Using An Array
- Valid Anagrams
- Valid Palindrome
- Valid Paranthesis
- Queue Reversal
- Best Time for Stocks
- Count Inversions
- Count triplets with sum smaller than a given value
- Find First and Last Position of Element in Sorted Array
- Find First and Last Position of Element in Sorted Array Optimized
- Find Duplicates
- Generate Parentheses
- Group Anagrams
- Integer Break
- Kth Largest Number
- Longest Palindromic String
- Longest Palindromic String Optimized
- Longest Repeating Character Replacement
- Longest Substring Without Repeating Characters
- Majority Element
- Majority Element II
- Merge Two Sorted Arrays
- Overlapping Intervals
- Palindromic Substrings
- Permutations
- Product of Array except itself
- Product of Array except itself optimized
- Radix Sort
- Reversing a Subarray
- Reverse Integer
- Rotate Image
- Set Zero Matrix
- Stack with operations on Middle Element
- Spiral Matrix
- String to Integer
- Target Sum of Rotated Sorted Arrays
- Three Sum
- Infix to Postfix