- 5
- 0
- 约4.38万字
- 约 11页
- 2017-06-08 发布于河南
- 举报
数据结构第五章串和数组演习(国外英文资料)
数据结构第五章串和数组练习(国外英文资料)
Basic concepts:
S1 = Data Structure Course, S2 = Structure, S3 = Base.
(1) Length (S1); 21
(2) (2) Compare (S2, S3); 1
(3) Insert (S1, 5, S3); The DataBase Structure Course
(4) Delete (S1, 5, 9); Datae Course
(5) SubString (S1, 5, 9, T); Structur
(6) Search (S1, 0, S2);
(7) Replace (S1, 0, S2, S3) Data Base Course
Algorithm design:
Set a string using static array storage structure, and write functions that implement two strings of Compare Compare (S, T). And the comparison is equal to and not equal to two.
Void compare (String s1, String s2) {
Int I = 0;
The else
While (I = s1.).
I++;
}
If (I + 1 = = ss.length)
Cout = equals \ n ;
The else
Cout not equal \ n;
}
Set the string to the static array store structure, and write the function to implement two strings of comparison Compare (S, T). The result is greater than or equal to less than three.
Void compare2 (String s1, String s2) {
Int Max, flag;
Max = s1. Length = s2. Length? S1.
For (int I = 0; I Max; I + +) {
If (sb.elem [I] s2. Elem [I]) {...
Flag = 1; Break; }
The else
If (s1. Elem [I] s2. Elem [I])
Flag = 1; Break; }
The else
The continue;
}
If (flag = = 1)
Cout s1 s2 \ n;
If (flag = = 1)
The cout s2 \ n ;
If (I = = s1. Length)
Cout s1 = s2 \ n;
}
Four sets of dynamic array storage structures, and write functions that implement two strings of comparison Compare (S, T). The result is greater than or equal to less than three. Comparing this problem with the algorithm of problem 4-13, whether the static array storage structure of a string and the dynamic array storage structure of a string is affected by the comparison algorithm of the writing string.
Static array storage structure, which defines the length of the string and the length of the character.
Dynamic array storage structure, which can be used to determine the length of characters as needed.
5 a string of the static array storage structure, write a function realizes the string to Replace the Replace (S, start, T
您可能关注的文档
- 幼儿园小班游戏观察迟疑记录(国外英文资料).doc
- 幼儿园英语措辞情况的主要性(国外英文资料).doc
- 幼儿园集体备课的环节和教师备课新架构(国外英文资料).doc
- 幼儿心思学温习1(国外英文资料).doc
- 幼儿措辞能力的造就(国外英文资料).doc
- 幼儿措辞表达能力的晋升方法(国外英文资料).doc
- 幼儿教员的教授教化措辞特质及现实题目浅析(国外英文资料).doc
- 幼儿社会性来往能力的造就(国外英文资料).doc
- 幼儿园常用的教授教化手腕和教授教化方法(国外英文资料).doc
- 幼儿科学观摩课教研运动反思(国外英文资料).doc
- 2025-2026学年天津市和平区高三(上)期末数学试卷(含解析).pdf
- 2025-2026学年云南省楚雄州高三(上)期末数学试卷(含答案).pdf
- 2025-2026学年甘肃省天水市张家川实验中学高三(上)期末数学试卷(含答案).docx
- 2025-2026学年福建省厦门市松柏中学高二(上)期末数学试卷(含答案).docx
- 2025-2026学年广西钦州市高一(上)期末物理试卷(含答案).docx
- 2025-2026学年河北省邯郸市临漳县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省石家庄二十三中七年级(上)期末历史试卷(含答案).docx
- 2025-2026学年海南省五指山市九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省唐山市玉田县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省邢台市市区九年级(上)期末化学试卷(含答案).docx
最近下载
- 课件第3讲gps伪距测量原理.pptx VIP
- 焊割工操作安全培训内容课件.pptx VIP
- 蚌埠市博物馆展览陈列大纲.pdf VIP
- 《爷爷的爷爷从哪里来》整本书阅读 课件 四年级下册语文(统编版).pptx VIP
- 指南共识│咯血诊治专家共识.pptx
- 博物馆陈列展览大纲精编.docx VIP
- Q/GDW 376.1-2009《电力用户用电信息采集系统通信协议:主站与采集终端通信协议》及编制说明1.doc VIP
- 阀门电动执行装置设计毕业设计(论文).doc VIP
- 中考数学二轮复习 专题11 二次函数与矩形、菱形的存在性问题(知识解读)(解析版).doc VIP
- 博物馆陈列展览大纲(2019最新版).docx VIP
原创力文档

文档评论(0)