摘要: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order,We get the following sequence 阅读全文
posted @ 2018-09-12 23:41 鸭子船长 阅读(154) 评论(0) 推荐(0)
摘要: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given1->2->3->4->5->NULLand k =2,return4->5->1->2->3->NUL 阅读全文
posted @ 2018-09-12 23:16 鸭子船长 阅读(131) 评论(0) 推荐(0)
摘要: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文
posted @ 2018-09-12 23:03 鸭子船长 阅读(178) 评论(0) 推荐(0)
摘要: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2018-09-12 21:54 鸭子船长 阅读(120) 评论(0) 推荐(0)