摘要: Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?Have you been asked this question in an interview?public class Solution { public int singleNumb... 阅读全文
posted @ 2014-02-25 12:23 Averill Zheng 阅读(146) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.Have you been asked this question in an interview?YesDiscuss/** * Definition for singly-linked list with a random pointer. * class RandomL 阅读全文
posted @ 2014-02-25 07:56 Averill Zheng 阅读(148) 评论(0) 推荐(0) 编辑