码迷,mamicode.com
首页 >  
搜索关键字:palindrome linked li    ( 14538个结果
【转】Javascript+css 实现网页换肤功能
来源:http://www.php100.com/html/webkaifa/DIV_CSS/2008/1014/2326.htmlHtml代码部分:1.要有一个带id的样式表链接,我们要通过操作这个链接来调用不同的href.2.皮肤选择按钮(后台为每个li添加onclick事件,触发换肤功能) 灰...
分类:编程语言   时间:2014-06-10 21:29:25    阅读次数:389
[Leetcode] Merge k Sorted Lists
Question: Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.Solution: Find the smallest list-head first....
分类:其他好文   时间:2014-06-10 19:51:30    阅读次数:278
【leetcode】Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan, a canal: Panama" is a palindrome. "race a car" is no...
分类:其他好文   时间:2014-06-10 18:36:29    阅读次数:193
Merge Two Sorted Lists
题目 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 方法 有序链表,合并成一个有序链表。 public ListNod...
分类:其他好文   时间:2014-06-10 18:13:11    阅读次数:241
[leetcode]Palindrome Number @ Python
原题地址:https://oj.leetcode.com/problems/palindrome-number/题意:Determine whether an integer is a palindrome. Do this without extra space.click to show spo...
分类:编程语言   时间:2014-06-10 16:06:52    阅读次数:286
湖南师范大学 11460 区间求最值
区间求最值   Problem description   给定一个长度为N 的数组,有q个询问,每个询问是求在数组的一段区间内那个元素的因子的个数最大,比如24的因子的个数就是8。  Input   首先是一个整数t,表示有t组测试数据,每组测试数据的第一行是一个整数N(1i(1ii,ri(lii,li>=1,rii+1>=li,ri+1>=...
分类:其他好文   时间:2014-06-10 15:21:18    阅读次数:145
【Leedcode】Insertion Sort List
Sort a linked list using insertion sort. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *nex...
分类:其他好文   时间:2014-06-10 12:14:19    阅读次数:253
leetcode--Partition List
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:其他好文   时间:2014-06-10 12:06:09    阅读次数:205
【leetcode】Linked List Cycle
问题: 给定个单链表,判断该链表是否存在环。 分析: 这个问题是见的非常多的题目,问题本身而言,技巧性很强,或者说思路很巧妙,这里要说的不是这个题目本身,而是说这种技巧,在很多的地方是用的到的,比如,在寻找单链表的中间节点的时候,就可以用这种形式,一个走两步,一个走一步的形式,来获得中间节点。 // bool hasCycle(ListNode *head) { if(...
分类:其他好文   时间:2014-06-10 10:48:49    阅读次数:176
【leetcode】Flatten Binary Tree to Linked List
分析: 问题是将给定的二叉树变换成令一种形式,这种类型的问题,其模式是,将左子树变换成某种形式,右子树也变换成这种形式,然后再与根结点按规定的方式连接起来,那么整体就变换完成了。这个题我们就可以采用这种形式,麻烦的地方就是在进行连接的时候,我们假设根为root,左子树变换后的根为root_left,右子树变换后的根为 root_right,那么连接的时候应该是root->right = root...
分类:其他好文   时间:2014-06-10 07:27:10    阅读次数:201
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!