JIANRU啊
JIANRU啊
全部文章
分类
C++(1)
C语言(19)
PAT(13)
学习笔记(4)
数据结构(15)
归档
标签
去牛客网
登录
/
注册
JIAN
全部文章
(共52篇)
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...
2019-05-16
0
999
04-树4 是否同一棵二叉搜索树 (25 分)
给定一个插入序列就可以唯一确定一棵二叉搜索树。然而,一棵给定的二叉搜索树却可以由多种不同的插入序列得到。例如分别按照序列{2, 1, 3}和{2, 3, 1}插入初始为空的二叉搜索树,都得到一样的结果。于是对于输入的各种插入序列,你需要判断它们是否能生成一样的二叉搜索树。 输入格式: 输入包含若...
2019-05-14
0
898
03-树3 Tree Traversals Again (25 分)
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the...
2019-05-09
0
1113
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...
2019-05-08
0
606
线性结构4 Pop Sequence (25 分)
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given seq...
2019-05-05
0
601
线性结构3 Reversing Linked List (25 分)
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6,...
2019-05-04
0
786
线性结构2 一元多项式的乘法与加法运算 (20 分)
设计函数分别求两个一元多项式的乘积与和。 输入格式: 输入分2行,每行分别先给出多项式非零项的个数,再以指数递降方式输入一个多项式非零项系数和指数(绝对值均为不超过1000的整数)。数字间以空格分隔。 输出格式: 输出分2行,分别以指数递降方式输出乘积多项式以及和多项式非零项的系数和指数。数...
2019-05-03
0
525
Maximum Subsequence Sum (25 分)
Given a sequence of K integers A continuous subsequence is defined to be where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which ha...
2019-05-02
0
475
C语言菜鸟编程笔记
1.scanf()后使用gets()函数注意事项 在gets函数前面加一条语句 fflush(stdin);就OK了,因为scanf函数输入时,它不读取换行符,所以在stdin中会把换行符留在里面,因此到了gets的时候就不用输入读取完这个换行符就结束了 2.浮点数计算二三事 (1)注意计算结...
2019-05-01
0
497
奇数值结点链表 (20 分)
本题要求实现两个函数,分别将读入的数据存储为单链表、将链表中奇数值的结点重新组成一个新的链表。链表结点定义如下: struct ListNode { int data; ListNode *next; }; 函数接口定义: struct ListNode *read...
2019-05-01
0
1307
首页
上一页
1
2
3
4
5
6
下一页
末页