摘要: 这个问题曾经在美团二面的时候,面试官问场景题考察过,但是当时并不知道面试官考察的知识点 #字典树: 是一种树形结构,典型应用是用于统计,排序和保存大量的字符串(但不仅限于字符串,如01字典树)。主要思想是利用字符串的公共前缀来节约存储空间。很好地利用了串的公共前缀,节约了存储空间。字典树主要包含两种 阅读全文
posted @ 2021-06-21 11:58 shenlei_blog 阅读(67) 评论(0) 推荐(0)
摘要: 今天开始把以前一些八股文整理补充,给秋招做准备! 阅读全文
posted @ 2021-06-17 11:17 shenlei_blog 阅读(30) 评论(0) 推荐(0)
摘要: ###类的对象像是C中钩子函数的作用,对象可以直接调用原函数的方法像是函数的别名,一般和lambda表达式一起用的较多 代码样例: /* * function< return type<para>> obj; */ function <int<int,int>> func=[](int a,int 阅读全文
posted @ 2021-06-15 15:16 shenlei_blog 阅读(97) 评论(0) 推荐(0)
摘要: #lambda ##参考自:CSDN lambda 表达式的简单语法如下:[capture] (parameters) → return type ,只有 [capture] 捕获列表和 函数体是必选的,其他可选 int main() { /*例一: * 三部分 * [] : 代表lambda表达式 阅读全文
posted @ 2021-06-15 11:47 shenlei_blog 阅读(58) 评论(0) 推荐(0)
摘要: 直接上代码 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<vector<int>> arr; for(int i=0;i<10;i++){ arr 阅读全文
posted @ 2021-06-09 14:00 shenlei_blog 阅读(77) 评论(0) 推荐(0)
摘要: 早上11点开始面: 一面问c++,与c的区别 问c++三大特性 问c++重载 问c++虚函数,构造函数,析构函数 问c++ vector容易有哪些问题 问项目相关,聊了20分钟 最后手撕一道简单题,就是把一个十进制数,转换成二进制数,再反转二进制数,再转换成十进制数 二面: 聊人生,聊兴趣爱好,聊以 阅读全文
posted @ 2021-04-22 13:54 shenlei_blog 阅读(110) 评论(0) 推荐(0)
摘要: 一面: 算法题二叉树前序遍历 Http与https区别 讲一下为什么https更安全 get,post cookie,session 如果post里面有get的参数,服务器能识别到嘛 B+树红黑树,B+树优点 索引的优势 二面: c++内存管理 new,malloc 操作系统内存管理 函数运行过程- 阅读全文
posted @ 2021-04-12 15:04 shenlei_blog 阅读(70) 评论(0) 推荐(0)
摘要: 问题来源:leetcode简单题1114按序打印 首先针对这个问题给出一种做法:(看底下题解说的是这样写是不正确的,但是可以ac) class Foo { private: mutex mu1; mutex mu2; public: Foo() { mu1.lock(); mu2.lock(); } 阅读全文
posted @ 2021-04-09 11:59 shenlei_blog 阅读(106) 评论(0) 推荐(0)
摘要: 题目:leetcode 46 class Solution { public: void dfs(vector<int> nums,vector<int> path,int dept,vector<bool> used){ if(dept==nums.size()){ res.push_back(p 阅读全文
posted @ 2021-04-08 12:25 shenlei_blog 阅读(89) 评论(0) 推荐(0)
摘要: ##left,right,inner join的区别 一、sql的left join 、right join 、inner join之间的区别 left join(左联接) 返回包括左表中的所有记录和右表中联结字段相等的记录 right join(右联接) 返回包括右表中的所有记录和左表中联结字段相 阅读全文
posted @ 2021-04-08 11:25 shenlei_blog 阅读(78) 评论(0) 推荐(0)