首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
JacobGo!
阿里巴巴_云智能_Java开发
门头沟学院
2019届
Java工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(181)
有效括号序列
47
import java.util.Stack; public class Solution { public boolean isValid(String s) { Stack<Character> stack = new Stack<Character>();...
发表于 2017-07-19 10:32:56
在Java中,对于不再使用的内存资源,“垃圾回收器”自动将其释放。( )
1
有点疑惑,错误的原因是 gc只回收对象?
发表于 2017-07-19 09:22:00
电话字母的组合
5
* * 牛客网:回溯法 */ ArrayList<String> res=new ArrayList<String>(); public ArrayList<String> letterCombinations(String digits) { i...
发表于 2017-07-18 11:55:24
最长公共前缀
6
** * * @author Jacob * */ public class Demo1 { /* * 对字符串数组进行排序,然后只要比较首尾两个字符串即可 */ public String longestCommonPrefix(String[] strs) { ...
发表于 2017-07-18 09:58:46
罗马数字转化为整数
1
public int romanToInt(String s) { int nums[]=new int[s.length()]; for(int i=0;i<s.length();i++){ switch (s.charAt(i)){ case 'M': nu...
发表于 2017-07-16 12:16:40
数字变成罗马数字
13
//感觉这道题没什么意义 public String intToRoman(int num) { int[] values = { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 }; String[] strs = { "...
发表于 2017-07-16 12:01:27
拆分词句
4
import java.util.*; //题意:把wordDict中的元素进行组合,可以重复使用,是否可以拼成s public class Solution { public boolean wordBreak(String s, Set<String> dict) { ...
发表于 2017-07-15 12:26:44
买卖股票的最好时机 iii
1
public int maxProfit(int[] prices) { if (prices == null || prices.length < 2) return 0; // 四个变量分别表示经过当前操作以后的profit int firstBuy = Integer....
发表于 2017-07-15 10:47:25
买卖股票的最好时机(一)
1
/* * Runtime: Runtime: 1 ms.Your runtime beats 86.61 % of java submissions */ public int maxProfit(int[] prices) { if(prices==null||prices.leng...
发表于 2017-07-15 09:12:35
三角形
1
/* * 从下往上遍历,不需要开辟额外的空间 */ public int minimumTotal(ArrayList<ArrayList<Integer>> ***) { int rows=***.size(); for(int i=rows-2;i>...
发表于 2017-07-14 13:20:33
首页
上一页
9
10
11
12
13
14
15
16
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题