摘要: 1.字符流中第一个不重复的字符 题目:请实现一个函数用来找出字符流中第一个只出现一次的字符。 举例说明 例如,当从字符流中只读出前两个字符“go”时,第一个只出现一次的字符是‘g’。当从该字符流中读出前六个字符“google”时,第一个只出现 1 次的字符是”l”。 解题思路 字符只能一个接着一个从 阅读全文
posted @ 2016-09-28 12:13 毛线刷题笔记 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1. Unique Characters of a String 字符串中不同的字符 Implement an algorithm to determine if a string has all unique characters. What if you cannot use additiona 阅读全文
posted @ 2016-09-28 11:42 毛线刷题笔记 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 1.permutations Given a list of numbers, return all possible permutations. For nums = [1,2,3], the permutations are: [ [1,2,3], [1,3,2], [2,1,3], [2,3, 阅读全文
posted @ 2016-09-28 09:33 毛线刷题笔记 阅读(1772) 评论(0) 推荐(0) 编辑