![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
爆发的~小宇宙
github地址:https://github.com/ordinary-zhang?tab=repositories
展开
-
LeetCode专题:242. Valid Anagram
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 = "nagaram"Output: trueExample 2:Input: s = "rat", t ..原创 2018-08-14 21:56:11 · 194 阅读 · 0 评论 -
LeetCode专题:268. Missing Number
Missing NumberGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.Example 1:Input: [3,0,1]Output: 2Example 2:Input: [9,6,4,2,3,5...原创 2018-08-14 22:28:32 · 127 阅读 · 0 评论 -
LeetCode专题:136.Single Number
Single NumberGiven a non-empty array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implemen...原创 2018-08-14 22:55:10 · 166 阅读 · 0 评论 -
LeetCode专题:88. Merge Sorted Array
88. Merge Sorted ArrayGiven two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:The number of elements initialized in nums1 and nums2 are m and n respectiv...原创 2018-08-16 21:59:02 · 179 阅读 · 0 评论 -
LeetCode专题:231. Power of Two
Power of TwoGiven an integer, write a function to determine if it is a power of two.Example 1:Input: 1Output: true Explanation: 20 = 1Example 2:Input: 16Output: trueExplanation: 24 = 16Exam...原创 2018-08-16 22:18:41 · 158 阅读 · 0 评论 -
LeetCode专题:53. Maximum Subarray
Maximum SubarraGiven an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Input: [-2,1,-3,4,-1,2,1,-5,4], Ou...原创 2018-08-22 00:42:05 · 237 阅读 · 0 评论