10 2013 档案

Leetcode: Single Number
摘要:最近做Leetcode上的题目,感觉有些挺有趣的,比如这个Single Number题目: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?如果没有时间和空间复杂度的限制,这道题并没有什么难处,大可以扫一遍数组,然后用hashmap记录每个数值出 阅读全文

posted @ 2013-10-05 22:57 Ryan-Xing 阅读(214) 评论(0) 推荐(0)