- 博客(212)
- 收藏
- 关注
原创 剑指 Offer 48. 最长不含重复字符的子字符串
双指针法// 滑动窗口(双指针解法)class Solution { public int lengthOfLongestSubstring(String s) { int l=0,r=0; char[] c=s.toCharArray(); HashSet<Character> set=new HashSet(); int res=0; while(r<c.length){
2021-05-06 21:42:31 132
原创 2021-05-06
题目:代码:class Solution { public void merge(int[] nums1, int m, int[] nums2, int n) { if(nums1==null||nums2==null||nums1.length==0||nums2.length==0){ return; } int[] temp=new int[m+n]; int index=0;
2021-05-06 20:28:00 134
原创 HJ100
求和公式:(a1+an)*n/2;import java.util.Scanner;/** * @Author Worm * @Date 2021/4/10 17:12 * @Version 1.0 **/public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.has..
2021-04-11 22:23:08 175
原创 HJ91
import java.util.Scanner;/** * @Author Worm * @Date 2021/4/10 17:12 * @Version 1.0 **/public class Main {// 注意是沿着线走,不是走格子 public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.ha...
2021-04-11 22:17:29 501
原创 HJ86
import java.util.Scanner;/** * @Author Worm * @Date 2021/4/10 17:12 * @Version 1.0 **/public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNextInt()){ ...
2021-04-11 22:00:05 161
原创 HJ2
import java.util.Scanner;/** * @Author Worm * @Date 2021/4/10 17:12 * @Version 1.0 **/public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String s = scanner.nextLine(); ...
2021-04-11 12:08:16 164
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人