首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
JacobGo!
阿里巴巴_云智能_Java开发
门头沟学院
2019届
Java工程师
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(181)
正则表达式匹配
5
/* * * 动态规划DP的应用 * Runtime: 29 ms.Your runtime beats 81.88 % of java submissions. */ public class Demo1 { /* * 如果对动态规划不太了解,可以参考博客:http://blo...
发表于 2017-07-07 10:09:45
将字符串转化为整数
9
public class Demo1 { /* * [leetcode]8. String to Integer (atoi) * 该题需要考虑的几个关键点:1.正负号;2.中间存在字母(只取字母前的数字);3.溢出;4.前后空格 * * Integer.Min_VALUE=-2...
发表于 2017-07-06 10:03:31
Z字形字符串
1
public String convert(String s, int numRows) { if (s == null || s.length() < numRows) return s; StringBuffer[] sb = new StringBuffer[numRows...
发表于 2017-07-05 13:27:10
最长的回文子串
14
/* * 感觉是最优解了,还有更好的解法求告知 */ private int left, maxLen; public String longestPalindrome(String s) { if (s == null || s.length() < 2) return s;...
发表于 2017-07-05 10:43:49
找出最长不重复字符的子串
1
/* * the basic idea is, keep a hashmap which stores the characters in string as keys * and their positions as values, and keep two pointers which...
发表于 2017-07-05 09:49:34
子集-ii
1
public ArrayList<ArrayList<Integer>> subsetsWithDup(int[] nums) { ArrayList<ArrayList<Integer>> res = new ArrayList<...
发表于 2017-07-03 10:49:47
合并两个有序的数组
83
/* * 最优解:从后往前处理,不需要开辟额外空间 * Runtime: 0 ms.Your runtime beats 45.38 % of java submissions. */ public void merge(int[] nums1, int m, int[] nums2,...
发表于 2017-07-03 10:25:29
最大的长方形
8
/* * 本体解法基于84. Largest Rectangle in Histogram * 把每一行看成求直方图中最大矩形面积问题 */ public int maximalRectangle(char[][] matrix) { if (matrix == null || m...
发表于 2017-07-03 09:29:41
直方图中的最大矩形
7
/* * Runtime: 24 ms.Your runtime beats 67.12 % of java submissions. */ public int largestRectangleArea(int[] heights) { if (heights == null || ...
发表于 2017-07-02 13:48:10
旋转排序数组搜索 ii
0
public boolean search(int[] nums, int target) { if (nums == null || nums.length < 1) return false; int left = 0, right = nums.length - 1; ...
发表于 2017-07-02 10:40:36
首页
上一页
11
12
13
14
15
16
17
18
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题