LeetCode 42: Trapping Rain Water

Problem DescriptionGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.Example 1Input: height = [0,1,0,2,1,0,

- Read more -

LeetCode 35: Search Insert Position

Problem DescriptionGiven a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You mu

- Read more -

LeetCode 32: Longest Valid Parentheses

Problem DescriptionGiven a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.Example 1Input: s = "(()" Output: 2 E

- Read more -

LeetCode 31: Next Permutation

Problem DescriptionA permutation of an array of integers is an arrangement of its members into a sequence or linear order.For example, for arr = [1,2,3], the following are all the permutations of arr:

- Read more -

LeetCode 29: Divide Two Integers

Problem DescriptionGiven two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator.The integer division should truncate toward zero, which means l

- Read more -

LeetCode 25: Reverse Nodes in k-Group

Problem DescriptionGiven the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.k is a positive integer and is less than or equal to the length of the linke

- Read more -

LeetCode 23: Merge k Sorted Lists

Problem DescriptionYou are given an array of k linked-lists lists, each linked-list is sorted in ascending order.Merge all the linked-lists into one sorted linked-list and return it.Example 1Input: li

- Read more -

Java Collection Framework

OverviewA collections framework is a class library to handle groups of objects. It is present in java.util package. It allows us to store, retrieve, and update a group of objects.Collections framework

- Read more -