摘要:
该题来自leetcode,原题如下:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only cons... 阅读全文
摘要:
斐波那契数列:1, 1, 2, 3, 5, 8, 13,...,即 f(n) = f(n-1) + f(n-2). 求第n个数的值。方法一:迭代 public static int iterativeFibonacci(int n) { //简单迭代 int a = 1, b =... 阅读全文