题解列表

筛选

二叉树遍历-题解(C++代码)

```cpp#include#includeusingnamespacestd;//定义一个二叉树的结构体typedefstructTree{chardata;structTree*lchild;structTree*rchild;};Tree*create_Tree(stringp,

24.重症病人优先 (C++代码)只做最好的思路!

听了老师傅讲解了堆之后,感觉没啥子新的收获,因为堆的代码没怎么接触过,本来想着用别的办法解决这题的,但是吧,sort排序,不方便接连选出第m个元素以及删除元素都是麻烦,用vector容器,碰上结构体,又不好操作,后来看了大神网友的代码,跟着大神码了一遍(堆是真的比较难~~),

大小写转换-题解(C++代码)

```cpp#include#include#includeusingnamespacestd;intmain(){chara[80];while(gets(a)){if(strcmp(a,"Endoffile")){intlen=strlen(a);for(inti=0;i='a'&&a[i]

回文数(一)-题解(C++代码)

```cpp#include#include#includeusingnamespacestd;boolis_huiwen(intn){chara[100];boolb=true;sprintf(a,"%d",n);intlen=strlen(a);for(inti=0;i=0;i--){b[j++]

回文串-题解(C++代码)

```cpp#includeusingnamespacestd;boolis_huiwen(strings){boolb=true;ints_len=s.size();for(inti=0;i>s){boolb=is_huiwen(s);if(b){cout