摘要: 题意 The count and say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is rea 阅读全文
posted @ 2016-09-20 20:28 Decouple 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 题意 Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in 阅读全文
posted @ 2016-09-20 18:30 Decouple 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 题意 Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the 阅读全文
posted @ 2016-09-20 18:16 Decouple 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 题意 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not pos 阅读全文
posted @ 2016-09-20 18:11 Decouple 阅读(175) 评论(0) 推荐(0) 编辑