08 2020 档案
摘要:Leetcode.16 3Sum Closest Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target.
阅读全文
摘要:Leetcode.18 4Sum 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?
阅读全文
摘要:Leetcode.15 3Sum 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
阅读全文
摘要:Leetcode.1 Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each
阅读全文
摘要:Leetcode.451 Sort Characters By Frequency Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" O
阅读全文
摘要:Leetcode.205 Isomorphic Strings Given two strings *s* and *t*, determine if they are isomorphic. Two strings are isomorphic if the characters in *s* c
阅读全文
摘要:Leetcode.290 Word Pattern Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a
阅读全文
摘要:Leetcode.202 Happy Number Write an algorithm to determine if a number n is "happy". A happy number is a number defined by the following process: Start
阅读全文
摘要:Leetcode.242 Valid Anagram Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Input: s = "anagram", t = "na
阅读全文
摘要:Leetcode.350 Intersection of Two Arrays II Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums
阅读全文
摘要:Leetcode.76 Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all the characters in T in compl
阅读全文
摘要:Leetcode.438 Find All Anagrams in a String Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consist
阅读全文
摘要:Leetcode.3 Longest Substring Without Repeating Characters Given a string, find the length of the longest substring without repeating characters. Examp
阅读全文
摘要:Leetcode.209 Minimum Size Subarray Sum( Java) Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous
阅读全文
摘要:Leetcode.11 Container With Most Water Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical
阅读全文
摘要:Leetcode.345 Reverse Vowels of a String Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Input: "hell
阅读全文
摘要:leetcode.344 Reverse String Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra
阅读全文
摘要:Leetcode.125 Valid Palindrome Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For
阅读全文
摘要:leetcode.167 Two Sum II - Input array is sorted Given an array of integers that is already *sorted in ascending order*, find two numbers such that the
阅读全文
摘要:Leetcode.88 Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elemen
阅读全文
摘要:Leetcode.215 Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted
阅读全文