2022年1月18日
摘要: 输入两个链表,找出它们的第一个公共节点。 如下面的两个链表: 在节点 c1 开始相交。 解法1 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListN 阅读全文
posted @ 2022-01-18 17:09 upupup-999 阅读(33) 评论(0) 推荐(0)
摘要: FIFO LRU 阅读全文
posted @ 2022-01-18 15:36 upupup-999 阅读(35) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-01-18 15:28 upupup-999 阅读(25) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-01-18 15:11 upupup-999 阅读(46) 评论(0) 推荐(0)
摘要: 输入整数数组 arr ,找出其中最小的 k 个数。例如,输入4、5、1、6、2、7、3、8这8个数字,则最小的4个数字是1、2、3、4。 1.常规解法 class Solution { public int[] getLeastNumbers(int[] arr, int k) { Arrays.s 阅读全文
posted @ 2022-01-18 12:43 upupup-999 阅读(31) 评论(0) 推荐(0)