思路: 比较两个链表端点值的大小,通过递归的方式排列。 1 #include 2 using namespace std; 3 4 struct ListNode 5 { 6 int val; 7 ListNode *next; 8 ListNode(int v = 0...
分类:
编程语言 时间:
2015-06-22 16:11:07
阅读次数:
123
Functions can also be called using keyword arguments of the form kwarg=value. For instance, the following function:def parrot(voltage, state='a stiff'...
分类:
其他好文 时间:
2015-06-22 14:53:31
阅读次数:
107
冒泡排序冒泡排序思想:把任意两个相邻的大小相反的位置交换、最多进行N趟、// 黑白算法之冒泡排序 #include #include #include using namespace std; const int maxn = 1005; int a[maxn]; i...
分类:
编程语言 时间:
2015-06-22 13:43:20
阅读次数:
141
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data.Entity;namespace Code...
分类:
其他好文 时间:
2015-06-22 13:40:16
阅读次数:
138
以后开始用宏定义与缩行了缺省原:#include#include#include#include#include#define rep(s,t) for(int i=s;i<=t;i++)#define ren for(int i=first[x];i!=-1;i=next[i])using nam...
分类:
其他好文 时间:
2015-06-22 13:38:05
阅读次数:
103
This is an incomplete list of datasets which were captured using a Kinect or similar devices. I initially began it to keep track of semantically label...
分类:
其他好文 时间:
2015-06-22 13:37:33
阅读次数:
265
步骤1:info.plist文件中添加:Required background modes字段,里面的item 值选择:App plays audio or streams audio/video using AirPlay步骤二:在Appdelegate.m中:- (BOOL)applicatio...
分类:
其他好文 时间:
2015-06-22 13:36:30
阅读次数:
152
标准的二分查找,大家可能都已经能记在脑海里了,但是稍微变形一下,可能就会出问题。本文写了一个二分查找算法,并且做了一个测试的脚手架,用二分查找和普通算法的结果进行比较来验证算法的正确性。 1 #include 2 #include 3 using namespace std; 4 int find(...
分类:
编程语言 时间:
2015-06-22 12:22:40
阅读次数:
154
//静态链表,我觉得删除,排序,插入有意思。
#include
#define _MAX_ 0x7fffffff
using namespace std;template
struct Node
{
Type data;//保存的值
int cour;//下标,只用一个下标来解决问题。
};template<typename Typ...
分类:
编程语言 时间:
2015-06-22 11:11:51
阅读次数:
147
string构造函数,很多重载函数; 1 #include 2 #include 3 4 using namespace std; 5 int main() 6 { 7 string s1; 8 cout << s1 << endl; 9 10 string s2(5...
分类:
其他好文 时间:
2015-06-22 09:50:42
阅读次数:
130