摘要: A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number i 阅读全文
posted @ 2016-08-23 14:11 LiBlog 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator to flatten a 2d vector. For example, Given 2d vector = By calling next repeatedly until hasNext returns false, the order of elem 阅读全文
posted @ 2016-08-23 13:52 LiBlog 阅读(156) 评论(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 @ 2016-08-23 13:25 LiBlog 阅读(210) 评论(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 @ 2016-08-23 13:17 LiBlog 阅读(173) 评论(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 @ 2016-08-23 12:50 LiBlog 阅读(120) 评论(0) 推荐(0) 编辑