摘要: The idea is very simple: just extract the numbers from each version number and compare the numbers from beginning to the end. However, C++ seems to ha... 阅读全文
posted @ 2015-08-18 22:31 jianchao-li 阅读(298) 评论(0) 推荐(0) 编辑
摘要: The basic idea is to store the key-value pair in some container. In the following code, we make three type definitions:1 typedef list LI;2 typedef pai... 阅读全文
posted @ 2015-08-18 21:53 jianchao-li 阅读(336) 评论(0) 推荐(0) 编辑
摘要: The idea is similar to Strobogrammatic Number II: generate all those in-range strobogrammatic numbers and count.You may refer to this link for a very ... 阅读全文
posted @ 2015-08-18 15:04 jianchao-li 阅读(1594) 评论(0) 推荐(0) 编辑
摘要: Problem Description:Givennnodes labeled from0ton - 1and a list of undirected edges (each edge is a pair of nodes), write a function to check whether t... 阅读全文
posted @ 2015-08-18 10:58 jianchao-li 阅读(3464) 评论(0) 推荐(1) 编辑
摘要: A typical DFS problem. Just go ahead... 1 class Solution { 2 public: 3 bool exist(vector>& board, string word) { 4 int m = board.size(), n... 阅读全文
posted @ 2015-08-18 00:11 jianchao-li 阅读(212) 评论(0) 推荐(0) 编辑