![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法与数据结构
文章平均质量分 66
Mq_Go
这个作者很懒,什么都没留下…
展开
-
简单数据处理办法
最大公约数算法#include <iostream>using namespace std;int fun(int n,int m){ if(m==0){ return n; } return fun(m,n%m);}int main(){ int n,m; cin>>n>>m; cout<<fun(m,n%m); re原创 2017-04-10 08:34:25 · 421 阅读 · 0 评论 -
1064. Complete Binary Search Tree (30)(重点复习)
1064. Complete Binary Search Tree (30)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys...原创 2018-03-05 00:08:43 · 674 阅读 · 0 评论 -
127. ZigZagging on a Tree (30)
127. ZigZagging on a Tree (30)Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal seq...原创 2018-03-05 00:13:30 · 431 阅读 · 0 评论 -
1066. Root of AVL Tree (25)(平衡二叉树)
1066. 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 b...原创 2018-03-06 09:29:47 · 362 阅读 · 0 评论 -
C++随笔
函数 头文件 用法 作用 sqrt cmath sqrt(double) 开平方 reverse algorithm reverse(v.begin(),v.end()) 反转字符串 pow cmath pow(double,double) 幂 ostringstream stream sstream...原创 2018-03-11 16:02:21 · 256 阅读 · 0 评论