- 32
- 0
- 约7.58万字
- 约 69页
- 2021-10-16 发布于天津
- 举报
《Java 语言程序设计(基础篇) 》(第 10 版 梁勇 著)第二十二章 练习题答案
22.1
public class Exercise22_01 {
public static void main(String[] args) {
java.util.Scanner input = new java.util.Scanner(System.in);
System.out.print( Enter a string: );
String s = input.nextLine();
System.out.println( Maximum consecutive substring is +
maxConsecutiveSortedSubstring(s));
}
/**
The worst - case complexity is O(nA2), where n is s.length(). Can you improve
the algorithm?
*/
public static String maxConsecutiveSortedSubstring(String s) {
int [] maxConsecutiveLength = new int [s.length()];
int current = 0;
for ( int i = 1; i s.length
您可能关注的文档
最近下载
- 浦江县2022-2024年普通国省道公路小修保养采购项目招标文件.doc VIP
- 小学音乐-《小红帽》课件.说课材料.ppt VIP
- 日间嗜睡量表ESS.docx VIP
- 2023年5月HACCP危害分析与关键控制点体系审核员真题及答案.docx VIP
- 腱鞘炎诊疗专家共识(2026版).docx
- 2026年工会社会工作者招聘笔试试题及参考答案.docx VIP
- 2023年10月HACCP危害分析与关键控制点体系审核员(真题卷).docx VIP
- 2026年辽宁医药职业学院单招职业适应性考试题库精选答案详解.docx VIP
- 指数函数、对数函数的实际应用专项训练(原卷版).docx
- 北师大版六年级下册数学数学好玩 可爱的小猫(课件)(共19张PPT).pptx VIP
原创力文档

文档评论(0)