码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2014-11-19 07:18:17    阅读次数:236
UVA - 12504
Updating a DictionaryIn this problem, a dictionary is collection of key-value pairs, where keys are lower-case letters, and values are non-negative in...
分类:其他好文   时间:2014-11-19 07:04:07    阅读次数:223
ACM经典算法之字符串处理:字符串替换
语法:replace(char str[],char key[],char swap[]); 参数: str[]:在此源字符串进行替换操作 key[]:被替换的字符串,不能为空串 swap[]:替换的字符串,可以为空串,为空串表示在源字符中删除key[] 返回值:null 注意:默认str[]长度小于1000,如否,重新设定设定tmp大小 需要 string.h 源...
分类:编程语言   时间:2014-11-19 01:39:39    阅读次数:251
Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:其他好文   时间:2014-11-19 00:15:33    阅读次数:284
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-11-18 23:45:02    阅读次数:222
LINQ to XML
Nodes: Nodes 方法返回IEnumerable类型的对象,因为返回的节点可能是不同的类型,比如XElement.我们可以使用ofType(type)来指定返回某个类型的节点. Elements : 由于获取XElements是一个非常普遍的需求,于是出现了Nodes.OfType(XEle...
分类:其他好文   时间:2014-11-18 23:43:16    阅读次数:335
leetcode 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 ...
分类:其他好文   时间:2014-11-18 23:34:43    阅读次数:237
Binary Tree Level Order Traversal II
题目描述: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For example: Given binary tree {3,9,20,...
分类:其他好文   时间:2014-11-18 10:25:11    阅读次数:145
[Leetcode] Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2014-11-18 06:58:19    阅读次数:145
[Leetcode] Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:其他好文   时间:2014-11-18 06:52:58    阅读次数:226
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!