Now&Here
leetcode389 Find the Difference

leetcode#389 Find the Difference

Given two strings s and t which consist of only lowercase letters.

leetcode216 Combination Sum III

leetcode#216 Combination Sum III

Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.

leetcode39 Combination Sum

leetcode#39 Combination Sum

Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.

leetcode40 Combination Sum II

leetcode#40 Combination Sum II

Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.

leetcode665 Non-decreasing Array

leetcode#665 Non-decreasing Array

Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1element.

leetcode628 Maximum Product of Three Numbers

leetcode#628 Maximum Product of Three Numbers

Given an integer array, find three numbers whose product is maximum and output the maximum product.

leetcode485 Max Consecutive Ones

leetcode#485 Max Consecutive Ones

Given a binary array, find the maximum number of consecutive 1s in this array.

leetcode605 Can Place Flowers

leetcode#605 Can Place Flowers

Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they would compete for water and both would die.

leetcode566 Reshape the Matrix

leetcode#566 Reshape the Matrix

In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data.

leetcode581 Shortest Unsorted Continuous Subarray

leetcode#581 Shortest Unsorted Continuous Subarray

Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too.