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,
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,
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
Problem DescriptionP33There is an integer array nums sorted in ascending order (with distinct values).Prior to being passed to your function, nums is possibly rotated at an unknown pivot index k (1 &l
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
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:
Problem DescriptionYou are given a string s and an array of strings words. All the strings of words are of the same length.A concatenated substring in s is a substring that contains all the strings of
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
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
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
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