摘要:
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 order.You may assume no duplicates in the array. Here are few examples. [1,3,5,6], 5 → 2 [1,3,5,6], 2 → 1 [1,3,5,6], 7 → 4 [1,3,5,6], 0 → 0class Solutio 阅读全文
posted @ 2013-07-17 08:40
一只会思考的猪
阅读(103)
评论(0)
推荐(0)
摘要:
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 read off as "two 1s" or 21. 21 is read off as "one 2, then one 1" or 1211. Given an integer n, generate the nth sequence. Note 阅读全文
posted @ 2013-07-17 08:25
一只会思考的猪
阅读(182)
评论(0)
推荐(0)
浙公网安备 33010602011771号