码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
Leetcode-Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((...
分类:其他好文   时间:2014-11-21 06:58:22    阅读次数:262
Leetcode-Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your al...
分类:其他好文   时间:2014-11-21 06:55:40    阅读次数:187
Leetcode Reorder List
Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For exam...
分类:其他好文   时间:2014-11-20 23:12:33    阅读次数:172
指针疑难问题
swap(int *p1,int *p2){ int temp; temp=*p1; *p1=*p2; *p2=temp;}main(){ int a,b; int *pointer_1,*pointer_2; scanf("%d%d",&a,&b); ...
分类:其他好文   时间:2014-11-20 18:25:29    阅读次数:134
[LeetCode]Binary Tree Inorder Traversal
Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,3,2]. Note: Recursive solutio...
分类:其他好文   时间:2014-11-20 17:05:34    阅读次数:205
指针使用注意事项
题:即输入的两个整数按大小顺序输出。今用函数处理,而且用指针类型的数据作函数参数。swap(int *p1,int *p2){ int temp; temp=*p1; *p1=*p2; *p2=temp;}main(){ int a,b; int *pointer...
分类:其他好文   时间:2014-11-20 13:24:26    阅读次数:170
yield curve
1.A yield curve can be built using deposit rates, swap rates, and future/forward rates2.A par-coupon rate is the yield to maturity of a coupon-paying ...
分类:其他好文   时间:2014-11-20 07:55:42    阅读次数:232
PAT 1067 Sort with Swap(0,*)
#include #include #include using namespace std;int swap(vector &numpos, int va, int vb) { //printf("swap(%d at %d, %d at %d)\n", va, numpos[va], vb...
分类:其他好文   时间:2014-11-20 01:17:41    阅读次数:349
Maximum Depth of Binary Tree 树的最大深度
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2014-11-19 23:46:55    阅读次数:247
Leetcode: 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.代码:class ...
分类:其他好文   时间:2014-11-19 21:47:39    阅读次数:119
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!