水下功夫做透,水上才能顺风顺水。
上一页 1 2 3 4 5 6 7 8 9 10 ··· 40 下一页
摘要: 动态方程:d[i][j] = (a[i]=a[j])&&d[i+1][j-1]public String longestPalindrome(String str) { if (str==null||str.length()==1) { return str; } int len = str.len 阅读全文
posted @ 2022-03-05 19:57 北方寒士 阅读(24) 评论(0) 推荐(0) 编辑
摘要: public ListNode removeNthFromEnd(ListNode head, int n) { ListNode before = head; ListNode after = head; if(head==null){ return null; } while(n!=0){ be 阅读全文
posted @ 2022-03-05 18:52 北方寒士 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 target 的那 两个 整数,并返回它们的数组下标public int[] twoSum(int[] nums, int target) { int[] a = new int[2]; Map<Intege 阅读全文
posted @ 2022-03-05 11:49 北方寒士 阅读(11) 评论(0) 推荐(0) 编辑
摘要: public ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode res = new ListNode(); ListNode cur = res; int sum = 0; int carry = 0; while(l1!=nul 阅读全文
posted @ 2022-03-05 11:35 北方寒士 阅读(59) 评论(0) 推荐(0) 编辑
摘要: public ListNode mergeTwoLists(ListNode list1, ListNode list2) { // 使用带头结点的链表解决问题 // 待输出链表的头部 ListNode head = new ListNode(); // 待输出链表的 cur 结点 ListNode 阅读全文
posted @ 2022-03-03 15:53 北方寒士 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 给定一个长度为 n 的整数数组 nums 。 假设 arrk 是数组 nums 顺时针旋转 k 个位置后的数组,a56爆大奖在线娱乐们定义 nums 的 旋转函数 F 为: F(k) = 0 * arrk[0] + 1 * arrk[1] + ... + (n - 1) * arrk[n - 1]返回 F(0), F 阅读全文
posted @ 2022-02-27 20:57 北方寒士 阅读(123) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int lengthOfLongestSubstring(String s) { int len = s.length(), max = 0; //key是字符,value是字符位置 Map<Character, Integer> map = new 阅读全文
posted @ 2022-02-26 22:28 北方寒士 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-02-26 18:04 北方寒士 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 1. 查看指定行的日志 sed -n '341400,341470p' ./edu-message-info-2022-02-10-10.0.3.212.log 阅读全文
posted @ 2022-02-10 16:10 北方寒士 阅读(88) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2022-01-26 18:16 北方寒士 阅读(0) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 40 下一页