摘要: QuestionAll DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes us... 阅读全文
posted @ 2015-09-15 06:05 树獭君 阅读(206) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Solution 1 -- SetWe can use a hash set to record ea... 阅读全文
posted @ 2015-09-15 04:45 树獭君 阅读(146) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, re... 阅读全文
posted @ 2015-09-15 04:45 树獭君 阅读(123) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t= "car... 阅读全文
posted @ 2015-09-15 02:04 树獭君 阅读(164) 评论(0) 推荐(0) 编辑