摘要: 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 阅读(149) 评论(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 阅读(169) 评论(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 阅读(215) 评论(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 阅读(182) 评论(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 阅读(126) 评论(0) 推荐(0)