随笔分类 - PTA习题
摘要:【PTA】6-3 求链式表的表长 (10分) 函数接口定义: BinTree Insert( BinTree BST, ElementType X ); BinTree Delete( BinTree BST, ElementType X ); Position Find( BinTree BST,
阅读全文
摘要:【PTA】6-11 先序输出叶结点 (15分) 函数接口定义: void PreorderPrintLeaves( BinTree BT ); 其中BinTree结构定义如下: typedef struct TNode *Position; typedef Position BinTree; str
阅读全文
摘要:【PTA】6-10 二分查找 (20分) 函数接口定义: Position BinarySearch( List L, ElementType X ); 其中List结构定义如下: typedef int Position; typedef struct LNode *List; struct LN
阅读全文
摘要:【PTA】6-9 二叉树的遍历 (非递归)(25分) 函数接口定义: void InorderTraversal( BinTree BT ); void PreorderTraversal( BinTree BT ); void PostorderTraversal( BinTree BT ); v
阅读全文
摘要:【PTA】6-8 求二叉树高度 (20分) 函数接口定义: int GetHeight( BinTree BT ); 其中BinTree结构定义如下: typedef struct TNode *Position; typedef Position BinTree; struct TNode{ El
阅读全文
摘要:【PTA】6-7 在一个数组中实现两个堆栈 (20分) 函数接口定义: Stack CreateStack( int MaxSize ); bool Push( Stack S, ElementType X, int Tag ); ElementType Pop( Stack S, int Tag
阅读全文
摘要:【PTA】6-6 带头结点的链式表操作集 (20分) 函数接口定义: List MakeEmpty(); Position Find( List L, ElementType X ); bool Insert( List L, ElementType X, Position P ); bool De
阅读全文
摘要:【PTA】6-5 链式表操作集 (20分) 函数接口定义: Position Find( List L, ElementType X ); List Insert( List L, ElementType X, Position P ); List Delete( List L, Position
阅读全文
摘要:【PTA】6-3 求链式表的表长 (10分) 函数接口定义: ElementType FindKth( List L, int K ); 其中List结构定义如下: typedef struct LNode *PtrToLNode; struct LNode { ElementType Data;
阅读全文
摘要:【PTA】6-3 求链式表的表长 (10分) 函数接口定义: int Length( List L ); 其中 List结构定义如下: typedef struct LNode *PtrToLNode; struct LNode { ElementType Data; PtrToLNode Next
阅读全文
摘要:【PTA】6-2 顺序表操作集 (20分) 函数接口定义: List MakeEmpty(); Position Find( List L, ElementType X ); bool Insert( List L, ElementType X, Position P ); bool Delete(
阅读全文
摘要:【PTA】6-1 单链表逆转 (20分) 函数接口定义: 1 List Reverse( List L ); 其中 List结构定义如下: 1 typedef struct Node *PtrToNode; 2 struct Node { 3 ElementType Data; /* 存储结点数据
阅读全文

浙公网安备 33010602011771号