摘要: A magic index in an array A[0...n-1] is defined to be an index such that A[i] = i. Given a sorted array of distinct integers, write a method to find a 阅读全文
posted @ 2016-12-08 12:16 Phoebe815 阅读(326) 评论(0) 推荐(0) 编辑
摘要: Imagine a robot sitting on the upper left corner of grid with r rows and c columns. The robot can only move in two directions, right and down, but cer 阅读全文
posted @ 2016-12-08 10:39 Phoebe815 阅读(361) 评论(0) 推荐(0) 编辑
摘要: A child is running up a staircase with n steps and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible 阅读全文
posted @ 2016-12-08 06:32 Phoebe815 阅读(345) 评论(0) 推荐(0) 编辑