数据结构作业(My data structure assignment at college)
示例输入(input): 2x^5-12x^3+3x^90
3-3x^90+5x^2-6x^3
示例输出(output): 3+5x^2-18x^3+2x^5
提示: 识别输入多项式的系数和指数, 将其存入链表, 按指数排序, 然后相加。
输入表达式,包含加减乘除和括号运算;
利用运算符优先矩阵实现优先级比较;
利用运算符栈和操作数栈辅助实现运算;
运算数都是10以内数据。
A calculator supporting four arithmetic operations and parentheses.
例如:
输入(input):2+3*4-5,输出(output):9
通过输入的字符串先根序创建二叉树(create a binary-tree in pre-order);
中根序线索化二叉树(threading it in in-order);
对线索二叉树进行中根序遍历(traverse it in in-order)。
利用邻接表存储,创建一个有向图,顶点存储字母(A、B、C……)
(create a digraph based on adjacency list, store letters A B C ... in it);
实现图的广度优先遍历, 输出字符序列
(print the letters by using Breadth First Traversal)。
输入查找表的所有数据,创建分块索引;
块间查找采用折半查找;
块内查找采用顺序查找;
输入待查找的数据,实现分块查找。
accomplish block search, using binary search between blocks, and using sequence search in block.
输入待排序序列;
实现折半插入排序并输出;
实现快速排序并输出。
accomplish binary insertion sort and quick sort.
点击跳转到习题文件夹 Click to jump to the exercise folder
Insert data into an increment Sequence List without breaking its order
Compare 2 sqlists(A,B)
Remove a interval between minv and maxv from a increment sllist
Combine 2 link-lists sll1 and sll2, which are non-decreasing, to a non-increasing sll3 by using the space of sll1 and sll2
Remove all of the elements which are also present in sqlist B and sqlist C from sqlist A
Brackets Matching : () , [] and {}
Transform an expression from nifix form to reverse polish form
Implement the Initialization, Enqueue, Dequeue of a link-list-based round-robin queue