[LeetCode 81] Search in Rotated Sorted Array II [Java]
1. Description Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and w...
1. Description Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and w...
1. Description Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? 2. Example Given sorted array nums = [1,1,1,2,2,...
1. Description Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 has eno...
1. Description Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm'...
1. Description Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5...
1. Description Rotate an array of n elements to the right by k steps. 2. Example with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [...
1. Description Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target nu...
1. Description Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for a...
1. Description Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) w...
1. Description A zero-indexed array A consisting of N different integers is given. The array contains all integers in the range [0, N - 1]. Sets S[...