Algorithms-java repository
The repository contains solutions of HackerRank and Leecode challenges written in java.
Solutions
HackerRank
LeeCode
387. First Unique Character in a String
350. Intersection of Two Arrays II
346. Moving Average from Data Stream
151. Reverse Words in a String
122. Best Time to Buy and Sell Stock II
121. Best Time to Buy and Sell Stock
93. Delete Node in a Linked List
Remove Duplicates from Sorted Array
1578. Minimum Time to Make Rope Colorful
Educative
Smallest Subarray with a given sum (easy)
Longest Substring with maximum K Distinct Characters (medium)
Longest Substring with Distinct Characters (hard)
Longest Substring with Same Letters after Replacement (hard) Longest Subarray with Ones after Replacement (hard) Permutation in a String (hard)# String Anagrams (hard)# Smallest Window containing Substring (hard)# Pair with Target Sum (easy) Remove Duplicates (easy) Squaring a Sorted Array (easy) Triplet Sum Close to Target (medium) Triplets with Smaller Sum (medium) Subarrays with Product Less than a Target (medium) Dutch National Flag Problem (medium) LinkedList Cycle (easy) Happy Number (medium) Middle of the LinkedList (easy) Merge Intervals (medium) Insert Interval (medium) Intervals Intersection (medium) Conflicting Appointments (medium) Minimum Meeting Rooms (hard) Maximum CPU Load (hard) Find the Missing Number (easy) Find all Missing Numbers (easy) Find the Duplicate Number (easy) Find all Duplicate Numbers (easy) Reverse a LinkedList (easy) Reverse a Sub-list (medium) Binary Tree Level Order Traversal (easy) Reverse Level Order Traversal (easy) Zigzag Traversal (medium) Level Averages in a Binary Tree (easy) Minimum Depth of a Binary Tree (easy) Level Order Successor (easy) Binary Tree Path Sum (easy) Find the Median of a Number Stream (medium) Maximize Capital (hard)