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
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
Problem DescriptionGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.Example 1Input: n = 3 Output: ["((()))","(()())","(()
Problem DescriptionYou are given the heads of two sorted linked lists list1 and list2.Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two
Problem DescriptionGiven a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.A mapping of digits to l
Problem DescriptionGiven an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.Notice that the solution
Problem DescriptionYou are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).Find two lines that tog
Problem DescriptionGiven a string s, return the longest palindromic substring in s.Example 1Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid answer.Exa
Problem DescriptionGiven two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.The overall run time complexity should be O(log (m+n)).Example 1Inpu
Problem DescriptionGiven an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.You may assume that each input would have exactly one soluti
Java Data TypesPrimitive Data Typesbyteshortintlongfloat: ~6-7 decimal digitsdouble: 15 decimal digitschar: surrounded by single quotesbooleanNotes:End the value with an "f" for floats and "d" for dou