Buy and Sell Stock 3
Say you have an array for which the ith element is the price of a given stock on day i.
Say you have an array for which the ith element is the price of a given stock on day i.
Say you have an array for which the i-th element is the price of a given stock on day i.
Say you have an array for which the i-th element is the price of a given stock on day i.
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
Given an unsorted integer array, find the smallest missing positive integer.
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).
Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution.
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.