摘要: import org.w3c.dom.NodeList; public class Solution2 { public static ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode dummyhead = new ListNo 阅读全文
posted @ 2020-08-17 22:11 huxiaojie 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1.遇到时间复杂度高的算法,return无法返回参数。 解决方案:throw new illegalArgumentException. 2.数组复习 new int[]{arg1,arg2,arg3,arg4}; 方法二:两遍哈希表 为了对运行时间复杂度进行优化,我们需要一种更有效的方法来检查数组 阅读全文
posted @ 2020-08-17 13:00 huxiaojie 阅读(182) 评论(0) 推荐(0) 编辑