- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 八皇后问题总结
#include #include #include using namespace std; class Solution { public: vector a; //vector > s_total; void init(int n) { a.resize(n); for(int i=0;i<n;i++) { a[i]=-1000; } } /*void pr
2016-04-17 21:38:52
411
原创 归并排序非递归
#include using namespace std; int SR[10]; int TR[10]; void Merge(int i,int m,int n) { int k=0; int low=i; int j=m+1; while(i<=m&&j<=n) { if(SR[i]<SR[j]) { TR[k++]=SR[i++]; } else {
2016-04-15 15:30:29
161
原创 快速排序非递归实现
#include #include #include using namespace std; vector a; class node{ public: int low; int high; }; int parition(int low,int high) { int p=a[low]; int i=low; int j=high; if(j>i) { while(j>
2016-04-15 12:11:48
208
原创 [LeetCode 260] Single Number III 详解
题目给出: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. For example: Giv
2016-03-09 18:13:24
205
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人