
剑指Offer
Sanlence
学习是没有止境的,不可懈怠,每一天都是新的。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
剑指Offer --> Questions 35
#include #include #include using namespace std; const int CHARNUM = 256; unsigned char firstNotRepeatingChar(const string &s); int main() { string s; cin >> s; cout << firstNotRepeatingChar(原创 2015-03-15 17:59:27 · 377 阅读 · 0 评论 -
剑指Offer --> Question 36
#include #include "inversePairs.h" using namespace std; static int times = 0; void mergeSort(int num[], int start, int end) { if (num == nullptr) { cout << "invalid input." << endl; return;原创 2015-03-15 20:15:25 · 411 阅读 · 0 评论 -
剑指Offer --> Question 38
#include #include "test.h" using namespace std; int getTheLastestK(int num[], int length, int k); int getFirstK(int num[], int length, int k); int getNumberOfK(int num[], int length, int k);原创 2015-03-16 13:51:19 · 363 阅读 · 0 评论 -
剑指Offer --> Question 33
#include #include #include #include using namespace std; string intConvertString(unsigned int a); bool compareNumber(const string &a, const string &b); string printMinNumber(unsigned int num[],原创 2015-03-14 12:04:43 · 442 阅读 · 0 评论 -
剑指Offer --> Question 40
#include using namespace std; unsigned findThePositionOfFirstBitIs1(int num) { unsigned pos = 0; while (!(num & 0x1)) { num = num >> 1; pos++; } return pos; } bool isBit1(int num, unsign原创 2015-03-16 16:02:50 · 508 阅读 · 0 评论