摘要:
1 """ 2 Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. 3 Return the quotient af 阅读全文
摘要:
1 """ 2 Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. 3 Do not allocate 阅读全文
摘要:
1 """ 2 Implement strStr(). 3 Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 4 Example 1: 5 阅读全文
摘要:
1 """ 2 Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the 阅读全文
摘要:
1 """ 2 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 giv 阅读全文
摘要:
1 """ 2 Given a 32-bit signed integer, reverse digits of an integer. 3 Example 1: 4 Input: 123 5 Output: 321 6 Example 2: 7 Input: -123 8 Output: -321 阅读全文
摘要:
1 """ 2 Given a string, find the length of the longest substring without repeating characters. 3 Example 1: 4 Input: "abcabcbb" 5 Output: 3 6 Explanat 阅读全文
摘要:
1 """ 2 Given a collection of distinct integers, return all possible permutations. 3 Example: 4 Input: [1,2,3] 5 Output: 6 [ 7 [1,2,3], 8 [1,3,2], 9 [ 阅读全文
摘要:
1 """ 2 Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors i 阅读全文
摘要:
1 """ 2 Given a non-empty array of integers, return the k most frequent elements. 3 Example 1: 4 Input: nums = [1,1,1,2,2,3], k = 2 5 Output: [1,2] 6 阅读全文