background picture of the home page

25岁就去流浪

K8s

Kubernetes 为什么要K8s? 用 Docker 进行容器化管理之后方便了很多,容器少的话,可以使用 Shell 脚本来管理。但随着容器越来越多,容器也越来越难以管理,项目架构也越来越复杂,如何管理和维护这些容器,就是 Kubernetes 要解决的问题。 其实K8s就是管理docker容器

thumbnail of the cover of the post

链表

相交链表 总会相等的,要么在相交节点,要么在 public class Solution { public ListNode getIntersectionNode(ListNode headA, ListNode headB) { ListNode curA = headA

thumbnail of the cover of the post

子串

和为k的子数组 这个前缀和后的hashmap操作有点难想到 class Solution { public int subarraySum(int[] nums, int k) { int res = 0; int length = nums.length;

thumbnail of the cover of the post

日志

日志是啥? 你之前肯定接触过日志,但是可能只是在控制台在那看来看去,最后复杂粘贴扔给ai就完事。是不是? 日志分为系统日志和自定义日志 系统日志:

thumbnail of the cover of the post

矩阵

矩阵置零 class Solution { public void setZeroes(int[][] matrix) { int m = matrix.length; int n = matrix[0].length; boolean[] r

thumbnail of the cover of the post

Git

基本操作 远远不够 clone 准备:账号,密码,权限,url路径缺一不可

thumbnail of the cover of the post

双指针

移动零 如何控制双指针呢? [左指针,右指针)这里必须全为0 交换了后左指针往后移一位,右指针找下一个不为0的位置(保证1的成立),右指针到数组尾部结束 在遇到第一

thumbnail of the cover of the post

普通数组

前缀和+贪心算法  class Solution {      public int maxSubArray(int[] nums) {          int preSum = 0;          int minPreSum = 0;          int res = Integer.M

thumbnail of the cover of the post

滑动窗口

什么情况下会想到滑动窗口法: 任何题目如果没有思路其实都可以想一下暴力解法。这道题暴力解法思路简单: 遍历任意i,j,使得i和j之间的子串长度,等于p串的长度。该子串称之为x。该步复杂度为O(n)。 判断x是否与p是异位词。是的话,则把i加入答案中。该步复杂度为O(n)。 暴力法的复杂度为O

thumbnail of the cover of the post