Now&Here
leetcode220 Contains Duplicate III

leetcode#220 Contains Duplicate III

Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t and the absolute difference between i and j is at most k.

leetcode217 Contains Duplicate

leetcode#217 Contains Duplicate

Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct.

leetcode219 Contains Duplicate II

leetcode#219 Contains Duplicate II

Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k.

leetcode123 Best Time to Buy and Sell Stock III

leetcode#123 Best Time to Buy and Sell Stock III

Say you have an array for which the ith element is the price of a given stock on day i.

leetcode122 Best Time to Buy and Sell Stock II

leetcode#122 Best Time to Buy and Sell Stock II

Say you have an array for which the ith element is the price of a given stock on day i.

leetcode121 Best Time to Buy and Sell Stock

leetcode#121 Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i.

leetcode53 Maximum Subarray

leetcode#53 Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.

leetcode374 Guess Number Higher or Lower

leetcode#374 Guess Number Higher or Lower

We are playing the Guess Game. The game is as follows:

leetcode278 First Bad Version

leeetcode#278 First Bad Version

You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on the previous version, all the versions after a bad version are also bad.

leetcode35 Search Insert Position

leetcode#35 Search Insert Position

Given a sorted array 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.