
LeetCode C
qq_16923717
这个作者很懒,什么都没留下…
展开
-
10--LeetCode【Single Number】|C语言|
二进制的奇淫技巧原创 2017-08-16 15:42:04 · 811 阅读 · 0 评论 -
9---LeetCode【Maximum Subarray】|C语言|
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,-1,2,1] ha原创 2017-08-15 11:39:41 · 1591 阅读 · 0 评论 -
8---LeetCode【Jump Game】|C语言|
leetcode jump game的简单解法,使用C语言,只有6行原创 2017-08-15 10:37:47 · 261 阅读 · 0 评论 -
7---LeetCode【tag: Array】【Stock I】|C语言|总结
Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), d原创 2017-08-10 17:01:38 · 406 阅读 · 0 评论 -
6---LeetCode【tag: Array】【Rotate Array】|C语言|总结
Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:Try to come up as many solutions as原创 2017-08-09 16:01:43 · 384 阅读 · 0 评论 -
5---LeetCode【tag: Array】【Remove Element】|C语言|总结
Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant memory.原创 2017-08-09 14:40:55 · 365 阅读 · 0 评论 -
4---LeetCode【tag: Array】【Remove Duplicates from Sorted Array】|C语言|总结
sorted array原来是经过排序的数组,理解题意很重要,考虑边界很重要,如输入为[ ]的情况原创 2017-08-09 10:37:39 · 392 阅读 · 0 评论 -
3---LeetCode【Palindrome Number】|C语言|总结
Determine whether an integer is a Palindrome. Do this without extra space.问题分析:判断一个整数是否为回文数,并且不能使用额外的空间。什么是回文数?将自然数的各个数字反向排列得到的数与该自然数相等,则称该自然数为回文数。因为自然数只包括从0开始的整数,所以负数不是回文数,最小的回文数是0,其他有1原创 2017-08-08 16:40:32 · 454 阅读 · 0 评论 -
2---LeetCode【Reverse Integer】|C语言|总结
LeetCode Reverse IntegerReverse digits of an integer.更高效的算法注意防止溢出原创 2017-08-07 23:12:58 · 256 阅读 · 0 评论 -
1---LeetCode【Two Sum】|C语言|总结
LeetCode Two Sum 总结 分析这道题用到的知识点,分析算法的优缺点,时间复杂度,空间复杂度原创 2017-08-06 10:58:28 · 1183 阅读 · 0 评论