自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 【leetcode】题解 3. 无重复字符的最长子串

题目描述力扣https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/class Solution { public int lengthOfLongestSubstring(String s) { Set set = new HashSet(); int length = 0; int right = 0; for (int.

2021-12-16 00:02:01 896

原创 【leetcode】题解 28. 实现 strStr()

题目描述:力扣https://leetcode-cn.com/problems/implement-strstr/个人用的是暴力匹配的放法 public static int strStr(String haystack, String needle) { if (null == needle || "".equals(needle)) { return 0; } int flag = needle.length() - 1;

2021-12-09 21:04:48 3867

原创 【leetcode】题解 88. 合并两个有序数组

题目链接力扣https://leetcode-cn.com/problems/merge-sorted-array/看这个题目,是将两个有序数组合并成一个数组,思路很简单,直接将数组二合并到数组一中再使用sort排序class Solution { public void merge(int[] nums1, int m, int[] nums2, int n) { for(int i:nums2){ nums1[m] = i;.

2021-12-08 11:21:19 197

原创 【leetcode】题解 66. 加一

题目链接 力扣https://leetcode-cn.com/problems/plus-one/题目描述的含义是将原本int类型的数组加1后输出,阅读题目有两个思路解题:1.将数组转数字加1再转数组,但是这样转换有整数溢出的情况2.数组按位加一处理,得出结果class Solution { public int[] plusOne(int[] digits) {boolean flag = true; List<Integer> lis...

2021-12-07 23:55:24 536

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除