算法
文章平均质量分 94
bryce_zsq
这个作者很懒,什么都没留下…
展开
-
BJFU-Algorithm Design and Analysis-Experiment 7_string
字符串操作描述给定一个字符串S,打印操作结果。操作如下:Insert x i:将字符x插入位置i;Erase x:删除字符串S中的所有字符x;Replace x y:将字符串S中的所有字符x替换为y;Size:打印字符串的大小;Reverse:打印字符串S的反转;在此操作中不要更改S;Sub i j:打印从位置i到j的S的子串;Find str:打印字符串S中第一个str的起始位置;如果str不是S的子字符串,则打印-1。输入每个测试用例的第一行包含一个字符串S。接下来是5行。第一行原创 2021-05-22 16:49:47 · 635 阅读 · 2 评论 -
bjfu_Algorithm Design and Analysis-Experiment 6
7 Advanced Data StructureBinary Tree描述Given the preorder sequence and inorder sequence of a binary tree, can you find out its postorder sequence?输入The first line is an integer N (1<=N<=1000), the number of vertices of the binary tree. The next原创 2021-05-19 10:19:34 · 622 阅读 · 0 评论