摘要: 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. 阅读全文
posted @ 2020-08-17 16:28 mhp 阅读(98) 评论(0) 推荐(0)
摘要: 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? 阅读全文
posted @ 2020-08-17 16:27 mhp 阅读(78) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-17 16:21 mhp 阅读(109) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-17 16:18 mhp 阅读(81) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-17 16:16 mhp 阅读(88) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-17 16:13 mhp 阅读(87) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-13 15:18 mhp 阅读(91) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-13 15:17 mhp 阅读(80) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-13 15:15 mhp 阅读(107) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2020-08-13 15:11 mhp 阅读(117) 评论(0) 推荐(0)