01 2021 档案

进制转换
摘要:#include <iostream> #include <vector> #include <string> using namespace std; //进制转换 class Solution { public: string changeValue(int M, int N) { string 阅读全文

posted @ 2021-01-12 14:09 wlqsmiling 阅读(68) 评论(0) 推荐(0)

二分搜索
摘要:1 #include <iostream> 2 #include <vector> 3 #include <string> 4 5 using namespace std; 6 7 //二分搜索 8 9 int binarySearch(int a[],int length,int data) { 阅读全文

posted @ 2021-01-08 16:53 wlqsmiling 阅读(71) 评论(0) 推荐(0)

单链表反转
摘要:#include <iostream> #include <vector> #include <string> using namespace std; struct Node { int data; Node * next; }; Node * reverseList(Node * head) { 阅读全文

posted @ 2021-01-08 16:27 wlqsmiling 阅读(78) 评论(0) 推荐(0)

堆排序算法
摘要:1 #include <iostream> 2 #include <vector> 3 #include <string> 4 5 using namespace std; 6 7 class Solution 8 { 9 private: 10 public: 11 void adjustHeap 阅读全文

posted @ 2021-01-08 15:51 wlqsmiling 阅读(91) 评论(0) 推荐(0)

快速排序算法
摘要:#include <iostream> #include <vector> #include <string> using namespace std; class Solution { private: public: int partition(int a[], int left, int ri 阅读全文

posted @ 2021-01-08 14:46 wlqsmiling 阅读(83) 评论(0) 推荐(0)

导航