73. 矩阵置零 leetcode链接:https://leetcode.cn/problems/set-matrix-zeroes/description/ 方案一暴力求解 12345678910111213141516171819List<int[]> ls = new ArrayList<>();// 找到数值为0的位置for (int i = 0; i < matrix.len 2023-03-27 02_leetcode #LeetCode #Array #原地算法
18. 四数之和 leetcode链接:https://leetcode.cn/problems/4sum/description/ 方案一思路: 排序 + 对撞指针 时间复杂度:n² log(n) 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152List<List&l 2023-03-27 02_leetcode #LeetCode #Array #双指针
4. 寻找两个正序数组的中位数 leetcode链接:https://leetcode.cn/problems/median-of-two-sorted-arrays/description/ 方案一暴力求解 1234567891011121314151617int[] flag = new int[nums1.length + nums2.length];for (int i = 0; i < nums1.length; 2023-03-27 02_leetcode #LeetCode #Array #二分法
16. 最接近的三数之和 leetcode链接:https://leetcode.cn/problems/3sum-closest/description/ 方案一解题思路:排序 + 对撞指针; 注意点: target 的正负问题第一层for循环结束条件,一定要加上 i < nums.length - 2 防止程序编译报错 123456789101112131415161718192021222324252627 2023-03-27 02_leetcode #LeetCode #Array #双指针
66.加一 leetcode链接:https://leetcode.cn/problems/plus-one/ 方案一结果:可正常运行 1234567891011121314151617181920212223int[] result = new int[digits.length];int flage = 1;for (int i = digits.length -1 ; i > -1; i--) & 2023-03-26 02_leetcode #LeetCode #Array
15.三数之和 leetcode链接:https://leetcode.cn/problems/3sum/ 方案一暴力求解结果:有重复解,后期也一定会时间超时 1234567891011121314151617List<List<Integer>> result1 = new ArrayList<>();for (int i = 0; i < nums.length - 2023-03-25 02_leetcode #LeetCode #Array #双指针
centos7安装mysql5.7.41 参考链接https://blog.csdn.net/wudinaniya/article/details/81094578 安装包下载链接 https://dev.mysql.com/downloads/mysql/ 下载后的文件上传到服务器,通过xftp进行安装解压文件 1tar -xvf ../mysql-5.7.41-1.el7.x86_64.rpm-bundle.tar 删除mari 2023-03-25 04_MySQL #MySQL #linux #centos
CentOS7 基础操作 网络防火墙基本使用12345启动: systemctl start firewalld关闭: systemctl stop firewalld查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld开机启用 : systemctl enable firewalld 配置firewalld-cmd1234567891 2023-03-24 41_linux #linux #centos
centos7安装mysql8.0.32 参考链接https://blog.csdn.net/Escorts/article/details/118941623 安装包下载链接 https://dev.mysql.com/downloads/mysql/ 下载后的文件上传到服务器,通过xftp进行安装解压文件 1tar -xvf ../mysql-8.0.32-1.el7.x86_64.rpm-bundle.tar -C ./ 删除 2023-03-24 04_MySQL #MySQL #linux #centos
11.盛最多水的容器 leetcode链接:https://leetcode.cn/problems/container-with-most-water/ 方案二:双指针(对撞指针)算法的相关思想:https://zhuanlan.zhihu.com/p/71643340https://blog.csdn.net/lady_killer9/article/details/110246226 对撞指针 – 伪代码: 12 2023-03-24 02_leetcode #LeetCode #Array #双指针