这是小川的第 391 次更新,第 421 篇原创 01 看题和准备 今天介绍的是 LeetCode 算法题中 Easy 级别的第 253 题(顺位题号是 1071 )。对于字符串 和`T S = T + ... + T T`与自身连接1次或更多次)时,我们说 。 返回最大的字符串 ,使得 除以 ,` ...
分类:
其他好文 时间:
2019-07-24 09:24:45
阅读次数:
74
计算机认识字节,不认识字符编码:字符到字节解码:从字节到字符Strings="爽";编码:byte[]data=s.getBytes();//编码System.out.println(data.length);//获得字节数编码成其他字符集:data=s.getBytes("utf8");解码:需要:newString(bytes[]bytes,intoff
分类:
编程语言 时间:
2019-07-22 21:33:01
阅读次数:
129
description: Given an array of strings, group anagrams together Note: Note: All inputs will be in lowercase. The order of your output does not matter. ...
分类:
其他好文 时间:
2019-07-22 16:39:15
阅读次数:
61
problem 859. Buddy Strings 参考 1. Leetcode_easy_859. Buddy Strings; 完 ...
分类:
其他好文 时间:
2019-07-19 19:11:36
阅读次数:
97
packagemainimport("flag""fmt""io/ioutil""log""os""os/exec""path/filepath""strings")//获取指定目录及所有子目录下的所有文件,可以匹配后缀过滤。funcWalkDir(dirPthstring)(dirs[]string,errerror){dirs=make([]string,0,20)//遍历目录err=file
分类:
其他好文 时间:
2019-07-12 14:19:04
阅读次数:
467
问题描述: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occ ...
分类:
编程语言 时间:
2019-07-09 16:45:56
阅读次数:
125
字符串会放到字符串常量值=池,因此变量名不同,字符串相同,可以看作同一个对象如果new一个字符串,则不是同一个对象比较:.equals()在String里面比较的是对象的内容,==在String里面比较的是对象地址Strings="adawDawd";Strings2="adawwq";System.out.println(s.charAt(4));//提取下标为3的字符System.out.pr
分类:
编程语言 时间:
2019-07-09 00:26:17
阅读次数:
113
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 64676 Accepted: 26679 Description Given two strings a and b we define a*b to ...
分类:
其他好文 时间:
2019-07-08 10:52:20
阅读次数:
95
版本一:输入时间字符串形成日历思路:将字符串按照指定字符串格式形成时间类,再将时间类转换成日期类Strings="2019-7-7";//创建字符串DateFormatit=newSimpleDateFormat("yyyy-MM-dd");//构造方法指定日期格式Dated=it.parse(s);//通过SDF实例方法parse构造时间类Calendar
分类:
编程语言 时间:
2019-07-08 09:31:56
阅读次数:
123
Scannerscanner=newScanner(System.in);//创建输入对象Strings=scanner.nextLine();//获取输入字符串DateFormatit=newSimpleDateFormat("yyyy-MM-dd");Dated=it.parse(s);Calendarc=newGregorianCalendar();c.setTime(d
分类:
编程语言 时间:
2019-07-08 09:28:10
阅读次数:
176