1.数组的遍历 通常用双for循环或者foreach循环来遍历二维数组,例如: char arr[][]=new char[4][]; arr[0]=new char[] {'春','江','潮','水','连','海','平'}; arr[1]=new char[] {'海','上','明','月 ...
分类:
编程语言 时间:
2021-04-06 14:14:36
阅读次数:
0
█ 0.代码函数: ○ 0.1 边界 Integer.MAX_VALUE int[] preorder ==> preorder == null || preorder.length == 0 char[][] board ==> board == null int[][] matrix ==> ( ...
分类:
其他好文 时间:
2021-04-06 14:10:55
阅读次数:
0
<p><iframe name="ifd" src="https://mnifdv.cn/resource/cnblogs/ZLAir724UGA/my.html" frameborder="0" scrolling="auto" width="100%" height="1500"></ifram ...
分类:
其他好文 时间:
2021-04-06 14:08:34
阅读次数:
0
StringBuffer类、Arrays工具类、包装类、Character类 StringBuffer 是一个可变的字符串,是线程安全的字符串(效率低)用于拼接字符串; 构造方法 pubilc StringBuffer(String str); 指定字符串内容的字符串缓冲区对象 添加功能 pubil ...
分类:
其他好文 时间:
2021-04-05 12:40:44
阅读次数:
0
对于给定的一个字符串,统计其中数字字符出现的次数。 类和函数接口定义: 设计一个类Solution,其中包含一个成员函数count_digits,其功能是统计传入的string类型参数中数字字符的个数并返回。 裁判测试程序样例: #include <cstdlib> #include <cstdio ...
分类:
其他好文 时间:
2021-04-05 12:37:04
阅读次数:
0
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; int x; scanf("%s%d",&s,&x); int ans=0; int len =strlen(s); for(int i=0;i<len;i++ ...
分类:
其他好文 时间:
2021-04-05 12:35:59
阅读次数:
0
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; int x,y; while(scanf("%d %d",&x,&y)!=EOF){ scanf("%s",s); int ans=0; int len=str ...
分类:
其他好文 时间:
2021-04-05 12:35:26
阅读次数:
0
难度 medium 给定两个字符串 text1 和 text2,返回这两个字符串的最长 公共子序列 的长度。如果不存在 公共子序列 ,返回 0 。 一个字符串的 子序列 是指这样一个新的字符串:它是由原字符串在不改变字符的相对顺序的情况下删除某些字符(也可以不删除任何字符)后组成的新字符串。 例如, ...
分类:
其他好文 时间:
2021-04-05 12:24:42
阅读次数:
0
1.链接代码 char* my_strcat(char* dist, const char* src) { if (dist == nullptr || src == nullptr) { return dist; } char* cp = dist; while (*cp != '\0') { + ...
分类:
其他好文 时间:
2021-04-05 11:42:36
阅读次数:
0
状态说明: onCreate(生成) onStart(启动) onResume(恢复) onPause(暂停) onStop(停止) onDestroy(销毁) onRestart(重新启动) 生命周期的流程 对于单个Activity的生命周期 1.正常启动的时候onCreate-->onStart ...
分类:
移动开发 时间:
2021-04-02 13:25:51
阅读次数:
0