摘要:
Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linea 阅读全文
摘要:
/* 带有哨兵的链表。哨兵所在的位置是真正列表开始前的一位。记住这一点,即可轻松理解哨兵含义,并编写addFirst和addLast方法。*/ // first是否为空影响某些情况的判断,既然这样,找一个哨兵,指向first。就可解决这一问题。这个思路很好。 public class SLList_ 阅读全文
摘要:
简单的List功能实现,v1 public class SLList_1{ public static class IntNode{ public int item; public IntNode next; public IntNode(int i, IntNode n){ item = i; n 阅读全文