2021年1月8日

二分搜索

摘要: 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 阅读(50) 评论(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 阅读(65) 评论(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 阅读(64) 评论(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 阅读(65) 评论(0) 推荐(0) 编辑

导航