宇航员.
宇航员.
全部文章
分类
题解(2)
归档
标签
去牛客网
登录
/
注册
宇航员.的博客
全部文章
(共3篇)
题解 | #序列化二叉树#
利用先序递归法将二叉树转换为字符串 static char stringtree[500]={'\0'};//定义一个全局变量字符串 static int k=0;//标记字符串的当前位置 void string_tree(struct ...
字符串
C
深度优先搜索
二叉树
2022-07-23
2
315
题解 | #编写函数实现两数交换(指针方式)#
```void sort(int *array,int n) //冒泡排序法 { for(int i=0;i<n-1;i++) { for(int j=0;j<n-i-1;j++) { if(array[j]>...
C++
2022-03-30
1
415
题解 | #编写函数实现两数交换(指针方式)#
#include using namespace std; // write your code here void swap(int *a,int *b)//形参定义为指向a,b的指针 { //定义一个参数来交换a,b所指向的数值 int t=*a; *a=*b; *b=t; } int ma...
C++
2022-03-30
1
386