首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
成程晨
华中科技大学
2020届
Java工程师
铁头娃
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(157)
斐波那契数列
1
public class Solution { public int Fibonacci(int n) { int fib1=0,fib2=1,count=0; while(count<n) { int tmp=fib1+fib2...
发表于 2018-07-18 11:11:19
旋转数组的最小数字
1
public int minNumberInRotateArray(int [] array) { ArrayList<Integer> list=new ArrayList<>(); for(int i=0;i<array.length...
发表于 2018-07-18 11:07:45
用两个栈实现队列
1
import java.util.Stack; public class Solution { Stack<Integer> stack1 = new Stack<Integer>();//模仿进入队列 Stack<Integer> stack2...
发表于 2018-07-18 11:01:32
重建二叉树
1
public TreeNode reConstructBinaryTree(int [] pre,int [] in) { TreeNode root=new TreeNode(pre[0]); if(pre.length==1) { retu...
发表于 2018-07-17 17:54:05
从尾到头打印链表
1
public ArrayList<Integer> printListFromTailToHead(ListNode listNode) { ArrayList<Integer> arrayList=new ArrayList<>(); ...
发表于 2018-07-17 17:06:20
替换空格
2
public String replaceSpace(StringBuffer str) { String string=str.toString(); string=string.replaceAll(" ", "%20");...
发表于 2018-07-17 16:59:00
二维数组中的查找
1
public boolean Find(int target, int [][] array) { /** * 从第一行最后一个元素开始比较(记为a)。 * 若target<a,则a不可能在在二维矩阵的最后一列,因此之后的比较不再与最后一列元...
发表于 2018-07-17 16:52:59
取近似值
1
#include<stdio.h> int main() { float m,r; int n; while(scanf("%f",&m)!=EOF) { n=(int) m; r=10*(m-n...
发表于 2018-03-15 22:28:11
质数因子
1
#include<stdio.h> int main() { int i,n,j,a[100]; while(scanf("%d",&n)!=EOF) { i=2; j=0; while(...
发表于 2018-03-15 22:24:34
进制转换
2
#include<stdio.h> #include<string.h> #include<math.h> int main() { char a[100]; int i,len_a,j,sum; while(scanf("%s&...
发表于 2018-03-15 22:16:58
首页
上一页
6
7
8
9
10
11
12
13
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题