2014年7月5日

数据结构-Vector

摘要: 自定义Vector实现://///////////////////////////////////////////////////////////////////////////////// FileName : c2_vector.h// Author : Jimmy ... 阅读全文

posted @ 2014-07-05 16:22 醉清风JM 阅读(289) 评论(0) 推荐(0)

面试题目-计算最大公约数

摘要: #include using namespace std;long gcd(long m, long n){ while(n != 0) { long rem = m%n; m = n; n = rem; } return m;}in... 阅读全文

posted @ 2014-07-05 15:41 醉清风JM 阅读(172) 评论(0) 推荐(0)

数据结构-二分查找

摘要: 1 #include 2 #include 3 #include 4 #include "example_vec.h" 5 #include "printCollection.h" 6 using namespace std; 7 8 extern vector example_vec; ... 阅读全文

posted @ 2014-07-05 15:39 醉清风JM 阅读(247) 评论(0) 推荐(0)

面试题目-用递归通过单字符输出打印多位的数字

摘要: #include using namespace std;void printDigit( int n ){ cout = 10 ) printOut( n / 10 ); printDigit( n % 10 );}int main( ){ printOut( 1... 阅读全文

posted @ 2014-07-05 15:31 醉清风JM 阅读(177) 评论(0) 推荐(0)

导航