01 2023 档案
摘要:面试题45. 把数组排成最小的数 思路 使用到了快速排序 class Solution { public String minNumber(int[] nums) { // 初始化字符串数组 String[] strs = new String[nums.length]; // 循环添加 for(i
阅读全文
摘要:12. 矩阵中的路径 思路 DFS+回溯 class Solution { public boolean exist(char[][] board, String word) { for(int i = 0; i < board.length; i++){ for(int j = 0; j < bo
阅读全文
摘要:18. 删除链表的节点 思路 class Solution { public ListNode deleteNode(ListNode head, int val) { if(head == null) return null; if(head.val == val) return head.nex
阅读全文