12 2021 档案

摘要:1.基础算法 快速排序 // 以中心点 void quickSort(vector<int>& nums, int l, int r) { if (l >= r) return; int i = l - 1, j = r + 1, x = nums[l + r >> 1]; while (i < j 阅读全文
posted @ 2021-12-29 18:06 miyanyan 阅读(179) 评论(0) 推荐(0)
摘要:cplusplus上介绍了很多种方法 stack overflow 上有个很简短的方法 ####下面两种方法会漏掉空字符串,比如127.0.0.1.,最后一个空字符串会漏掉 #include <iostream> #include <string> #include <vector> #includ 阅读全文
posted @ 2021-12-03 10:04 miyanyan 阅读(610) 评论(0) 推荐(0)