摘要: 题目 Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots the 阅读全文
posted @ 2018-02-09 15:15 Yuanoung 阅读(87) 评论(0) 推荐(0)
摘要: 题目 A peak element is an element that is greater than its neighbors. Given an input array where , find a peak element and return its index. The array m 阅读全文
posted @ 2018-02-09 11:34 Yuanoung 阅读(100) 评论(0) 推荐(0)
摘要: 题目描述 We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess 阅读全文
posted @ 2018-02-09 11:04 Yuanoung 阅读(79) 评论(0) 推荐(0)
摘要: 正确的写法: 下面的这种写法: 会出现 报错,提示说 不存在 属性。 参数在 中时正常的,但是在调用 时, 参数的外面, 再次包裹了一次 ,所以导致 属性不存在。 阅读全文
posted @ 2018-02-07 19:53 Yuanoung 阅读(70) 评论(0) 推荐(0)