![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
Swan815
个人网站:www.lousiyuan.cn
展开
-
03 - 树 2 List Leaves (25 分)
Given a tree, you are supposed to list all the leaves in the order of top down, and left to right.Input Specification:Each input file contains one test case. For each case, the first line gives a posit原创 2017-03-28 14:03:47 · 294 阅读 · 0 评论 -
02 - 线性结构 2 一元多项式的乘法与加法运算 (20 分)
设计函数分别求两个一元多项式的乘积与和。输入格式:输入分 2 行,每行分别先给出多项式非零项的个数,再以指数递降方式输入一个多项式非零项系数和指数(绝对值均为不超过 1000 的整数)。数字间以空格分隔。输出格式:输出分 2 行,分别以指数递降方式输出乘积多项式以及和多项式非零项的系数和指数。数字间以空格分隔,但结尾不能有多余空格。零多项式应输出 0 0。输入样例:4 3 4 -5 2 6 1原创 2017-03-11 23:02:28 · 644 阅读 · 1 评论 -
04-树4 是否同一棵二叉搜索树 (25 分)
4 23 1 4 23 4 1 23 2 4 12 12 11 20输出样例:YesNoNo在经过老师讲解下完成了代码实现#include <stdio.h>#include <stdlib.h>typedef struct TreeNode* Tree;struct TreeNode{ int v; Tree Left,Right; int flag原创 2017-04-10 22:53:48 · 578 阅读 · 0 评论 -
04-树5 Root of AVL Tree (25 分)
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is原创 2017-04-10 22:58:47 · 955 阅读 · 0 评论 -
2017春招去哪儿笔试
不是很难,但是 lz 很菜。。。 第一题 题解#include <iostream>#include <stdlib.h> #include <stdio.h> #include <queue>#include <string.h>#define N 1000using namespace std; typedef struct BiTNode {原创 2017-04-01 22:57:02 · 1227 阅读 · 0 评论 -
线性结构 3 Reversing Linked List
#include <stdio.h>#include <stdlib.h>#define MAXSIZE 100001struct tNode{ int taddr; int tdata; int tnext;};struct Node{ int addr; int data; int next; struct Node* pNext原创 2017-04-18 18:22:27 · 277 阅读 · 0 评论