摘要: Given an array A, we may rotate it by a non-negative integer K so that the array becomes A[K], A[K+1], A{K+2], ... A[A.length - 1], A[0], A[1], ..., A 阅读全文
posted @ 2018-03-16 00:40 樱花落舞 阅读(275) 评论(0) 推荐(0) 编辑
摘要: We stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the 100th row. Each glass holds one cup 阅读全文
posted @ 2018-03-16 00:18 樱花落舞 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Given a directed, acyclic graph of N nodes. Find all possible paths from node 0 to node N-1, and return them in any order. The graph is given as follo 阅读全文
posted @ 2018-03-16 00:12 樱花落舞 阅读(260) 评论(0) 推荐(0) 编辑
摘要: We are given two strings, A and B. A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, 阅读全文
posted @ 2018-03-16 00:09 樱花落舞 阅读(183) 评论(0) 推荐(0) 编辑