摘要: Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. 阅读全文
posted @ 2019-01-18 19:41 yuxihong 阅读(124) 评论(0) 推荐(0) 编辑
摘要: In a directed graph, we start at some node and every turn, walk along a directed edge of the graph. If we reach a node that is terminal (that is, it h 阅读全文
posted @ 2019-01-18 03:32 yuxihong 阅读(120) 评论(0) 推荐(0) 编辑
摘要: In a given 2D binary array A, there are two islands. (An island is a 4-directionally connected group of 1s not connected to any other 1s.) Now, we may 阅读全文
posted @ 2019-01-18 01:55 yuxihong 阅读(180) 评论(0) 推荐(0) 编辑