上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 28 下一页
摘要: Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure.find 阅读全文
posted @ 2017-11-07 06:02 apanda009 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 这道题就是根据条件老老实实的做 阅读全文
posted @ 2017-11-07 05:30 apanda009 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2017-11-07 05:06 apanda009 阅读(482) 评论(0) 推荐(0) 编辑
摘要: Better idea is to maintain a hashset that contains at most k numbers 阅读全文
posted @ 2017-11-07 04:52 apanda009 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 阅读全文
posted @ 2017-11-07 04:46 apanda009 阅读(98) 评论(0) 推荐(0) 编辑
摘要: This is a follow up of Shortest Word Distance. The only difference is now word1 could be the same as word2. Given a list of words and two words word1 阅读全文
posted @ 2017-11-07 04:38 apanda009 阅读(142) 评论(0) 推荐(0) 编辑
摘要: This is a follow up of Shortest Word Distance. The only difference is now you are given the list of words and your method will be called repeatedly ma 阅读全文
posted @ 2017-11-07 04:33 apanda009 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. For example,Assume that words = 阅读全文
posted @ 2017-11-07 04:32 apanda009 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 要注意一种情况:isUnique("cake"), 应该是true. 虽然他的缩写在afterabbr出现,但是那就是他自己,没有别的跟他一样 阅读全文
posted @ 2017-11-06 04:51 apanda009 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 注意这是一一映射,也就是说如果a->dog, b->dog,就应该return false,所以应该在HashMap基础上再加一层检查,即若不含该key,加入map之前应该检查map.values().contains(String) 第二遍:use HashMap和HashSet 用 map.va 阅读全文
posted @ 2017-11-06 04:31 apanda009 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 28 下一页