DataStructure Tree
Zhejiang University Tree A Structure used for managing and organizing different levels of data. Properties A special node: Root® The rest nodes can be divided into m nonoverlapping subsets called SubTree. SubTrees do not overlap. Every Node has one parent except r. A tree with N nodes has N-1 sides. Terms Degree: The number of SubTrees for a Node. Degree of a Tree: The maximum Degree for all nodes of a tree. Leaf Parent Child Sibling Path and the Distance of Path: From Node n1 to Node nk...
DataStructure Queue
Zhejiang University Queue A restricted linear table. Queue and Round-robin Queue Properties AddQ DeleteQ FIFO Operation Set Queue CreateQueue(int Maxsize) int IsFull(Queue Q, int MaxSize) void AddQ(Queue Q, ElementType item) int IsEmpty(Queue Q) ElementType DeleteQ(Queue Q) indicators front(begins with -1) rear(begins with -1) Round-robin Queue A more efficient way to make use of space. Questions: How to tell whether a queue is full? Why is it difficult to tell whther it is full? ...
DataStructure Stack
Zhejiang University Stack Problem How to make computer understand the priority of calculating? Expression Nifix Expression is what we are customed to use. But Postfix Expression is easier for a computer to understand. We need a structure to store numbers and operators in order and get them out in the reverse order. Eg:6 2 / 3 - 4 2 * + store 6->store 2->6 2 out and divide store 3 in-> store 3->3 3 out and minus store 0 in…… Properties of Stack It is a limited linear table. Push...
DataStructure Linked List
Zhe Jiang University Design Target: Find the sum and the product of 2 polynomials. Data Structure 123456typedef struct PolyNode *Polynomial;struct PolyNode{ int coef; int expon; Polynomial link;}; Structure of the program 12345678Polynomial P1, P2, PP, PS;P1 = ReadPoly();P2 = ReadPoly();PP = Multi(P1, P2);PrintPoly(PP);PS = Add(P1, P2);PrintPoly(PS); Some New Ideas If you want to pass in a variable and let the function change it, you have to pass in a more ‘fundamental’ th...
Third Post
This post is just for test. There seems to be something wrong with the preview function on the home page. I will see if there is something wrong. developer TC
A Quick Start of Markdown
Overview This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to our reference guides for basic syntax and extended syntax. Basic Syntax These are the elements outlined in John Gruber’s original design document. All Markdown applications support these elements. Element Markdown Syntax Heading The more # you get, the smaller the heading will be. #H1 ##H2 ###H3 ...
First Post
This is my first Blog. Let’s celebrate and enjoy this site! I have just cleared the database! Welcome and share something interesting! developer tctco






