Browse Source

新增中煤项目简述
新增美团一面
新增归并排序算法

seamew 2 năm trước cách đây
mục cha
commit
0b35e6df73

+ 37 - 0
算法/排序算法/基本排序算法.md

@@ -45,3 +45,40 @@ int main() {
 }
 ```
 
+# 快速排序
+
+```cpp
+#include <bits/stdc++.h>
+using namespace std;
+
+void quickSort(vector<int>& nums, int left, int right) {
+    if (left >= right) return;
+    int temp = nums[left];
+    int i = left;
+    int j = right;
+    while (i != j) {
+        while (j > i && nums[j] >= temp) {
+            j--;
+        }
+        while (j > i && nums[i] <= temp) {
+            i++;
+        }
+        if (i < j) {
+            swap(nums[i], nums[j]);
+        }
+    }
+    swap(nums[left], nums[j]);
+    quickSort(nums, left, i - 1);
+    quickSort(nums, i + 1, right);
+}
+
+int main() {
+    vector<int> nums = {50, 10, 20, 30, 70, 40, 80, 60};
+    quickSort(nums, 0, nums.size() - 1);
+    for (auto num : nums) {
+        cout << num << " ";
+    }
+    return 0;
+}
+```
+

+ 28 - 0
面经/2023年暑期实习/美团一面.md

@@ -0,0 +1,28 @@
+# 美团一面 --  2023/4/3   90分钟
+
+1. 双亲加载机制
+2. 机制底层findclass
+3. 线程可见性volatile
+4. volatile关键字低层原理,字节码角度
+5. JVM内存分布
+6. full GC 和minin GC
+7. 三种清除算法
+8. CMS和G1垃圾收集器
+9. synchronized锁了解吗,低层优化
+10. 线程池的用法
+11. ThreadLocal是什么,低层原理
+12. hashmap低层数据结构
+13. hashset低层数据结构
+14. 常用的设计模式
+15. 索引的分类
+16. 他们的区分
+17. mysql低层数据结构
+18. 联合索引定义要注意哪些点
+19. 数据库ACID
+20. 数据库隔离级别
+21. MVCC
+22. TCP协议
+23. TCP和UDP区别
+24. TCP如何可靠
+
+算法题   59.螺旋矩阵II   https://leetcode.cn/problems/spiral-matrix-ii/

+ 27 - 0
面经/项目/中煤项目.md

@@ -0,0 +1,27 @@
+# kafka模块
+
+## kafka监控
+
+redis缓存
+
+复用连接  ---  多个线程复用AdminClient
+
+加锁
+
+spi
+
+jmx -- 多个端口
+
+热启动 -- 自动化
+
+## kafka消费
+
+线程池多线程消费   --- future
+
+幂等处理 -- redis缓存
+
+hash计算多个分区
+
+ack = 1
+
+顺序消费