码迷,mamicode.com
首页 >  
搜索关键字:palindrome linked li    ( 14538个结果
LeetCode OJ - Linked List Cycle
题目: Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space?解题思路: 使用快慢指针,快指针每次走两步,慢指针每次走一步...
分类:其他好文   时间:2014-05-16 05:19:21    阅读次数:271
LeetCode OJ - Linked List Cycle II
题目: Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull. Follow up: Can you solve it without using extr...
分类:其他好文   时间:2014-05-16 04:50:13    阅读次数:329
[LeetCode]Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space....
分类:其他好文   时间:2014-05-15 14:38:59    阅读次数:278
Leetcode 线性表 Linked List Cycle
题意:判断一个链表中是否有环 思路:快慢指针,如果有环,最终快慢指针会在非NULL相遇 注:用到fast->next前先要确保fast非NULL,要用fast->next->next前先要确保fast,fast->next非NULL 复杂度:时间O(n), 空间O(1) 相关题目:Linked List CycleII...
分类:其他好文   时间:2014-05-15 07:01:57    阅读次数:219
LeetCode-004 Add Two Numbers
【题目】 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Out...
分类:其他好文   时间:2014-05-15 05:13:49    阅读次数:306
LeetCode 009 Palindrome Number
【题目】 Determine whether an integer is a palindrome. Do this without extra space. 【题意】 题意判断一个整数是否是回文数 注意一下几点: 1. 不能用额外的空间 2. 负数不是回文数...
分类:其他好文   时间:2014-05-14 20:31:10    阅读次数:298
leetcode题目:Palindrome Partitioning 和Palindrome Partitioning II
题目一: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ...
分类:其他好文   时间:2014-05-14 15:10:01    阅读次数:293
LeetCode Sort List
在 O(nlogn)的时间内对一个链表进行排序。。明显是要用归并或者快排 第一次知道说原来归并也可以用链表来写,被刷了下三观。。。。。用快慢指针的方法找分界点。 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNod...
分类:其他好文   时间:2014-05-14 15:03:49    阅读次数:230
什么情况下会导致执行计划不走索引?
不走索引的情况还是蛮多的1、条件字段选择性弱,查出的结果集较大,不走索引;2、where条件等号两边字段类型不同,不走索引;3、优化器分析的统计信息陈旧也可能导致不走索引;4、索引字段 is null 不走索引;5、对于count(*)当索引字段有not null约束时走索引,否则不走索引;6、li...
分类:其他好文   时间:2014-05-14 13:46:56    阅读次数:326
html精灵技术(用来显示图片的某个区域)
.left .left_down li.a.left-down-pic{display:block;width:50px;height:50px;background:url(images/app_icons_50_6.jpg) -400px 0px no-repeat;//关键是这句话}
分类:Web程序   时间:2014-05-14 11:36:25    阅读次数:419
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!