码迷,mamicode.com
首页 >  
搜索关键字:lc    ( 989个结果
[LC] 367. Valid Perfect Square
Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio ...
分类:其他好文   时间:2019-11-17 12:31:52    阅读次数:68
[LC] 66. Plus One
Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant d ...
分类:其他好文   时间:2019-11-17 10:56:47    阅读次数:52
[LC] 7. Reverse Integer
Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 1 ...
分类:其他好文   时间:2019-11-17 10:33:14    阅读次数:62
[LC] 136. Single Number
Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti ...
分类:其他好文   时间:2019-11-13 12:58:51    阅读次数:98
题目:排序(二分&线段树)
题目 "传送门" 思路 此题两个思路 卡着过 表面上看这是一道紫题,但是数据真的水 ~~用心造题,用脚造数据~~ 实际上桶排就能过 但是需要加一个 小优化 对于每次排序的区间 只需要从区间的最小值枚举到最大值就行了 代码 cpp include include include define lc o ...
分类:编程语言   时间:2019-11-12 21:51:18    阅读次数:95
[LC] 392. Is Subsequence
Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s and t. t is po ...
分类:其他好文   时间:2019-11-12 11:31:16    阅读次数:90
[LC] 14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exampl ...
分类:其他好文   时间:2019-11-11 09:49:00    阅读次数:68
[LC] 165. Compare Version Numbers
Compare two version numbers version1 and version2.If version1 > version2 return 1; if version1 < version2 return -1;otherwise return 0. You may assume ...
分类:其他好文   时间:2019-11-11 09:28:41    阅读次数:84
[LeetCode] 160. Intersection of Two Linked Lists
求两个链表的交点。给个LC的截图作例子, 两种思路,一个是需要求出两个链表各自的长度,当两者不想等的时候,需要先遍历长的链表,使得其剩下的长度要跟短的链表长度相等,再去找两者的交点。如图所示就是需要先让B移动到node.value = 0的那个节点,再遍历A和B,看看交点在哪里。 时间O(n) 空间 ...
分类:其他好文   时间:2019-11-10 10:23:41    阅读次数:87
[LC] 84. Largest Rectangle in Histogram
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist ...
分类:其他好文   时间:2019-11-10 10:13:49    阅读次数:82
989条   上一页 1 ... 21 22 23 24 25 ... 99 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!