posts - 116,comments - 0,views - 66107
摘要: 大家都知道斐波那契数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项。public class Solution {public int Fibonacci(int n) {int target=0;if(n==0)return 0;if(n==1)return 1;int one=0;in... 阅读全文
posted @ 2015-12-28 22:02 小飞虫子 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 题目描述用两个栈来实现一个队列,完成队列的Push和Pop操作。 队列中的元素为int类型。import java.util.Stack;public class Solution {Stack stack1 = new Stack();Stack stack2 = new Stack();publ... 阅读全文
posted @ 2015-12-28 21:24 小飞虫子 阅读(396) 评论(0) 推荐(0) 编辑
摘要: What will be printed when you execute the following code?class C { C() { System.out.print("C"); }}class A { C c = new C(); A() { this("A"); Syst... 阅读全文
posted @ 2015-12-28 13:50 小飞虫子 阅读(195) 评论(0) 推荐(0) 编辑
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示