问题描述:查找二叉查找树第N大的数
代码:
#include<stdio.h>
#include<stdlib.h>
typedefstruct BSTreeNode
{
int Value;
struct BSTreeNode *pLeft;
struct BSTreeNode *pRight;
}*pBSTreeNode,BSTreeNode;
void FindNthMax(pBSTreeNode root,int &N,int &Result)
问题描述:查找二叉查找树第N大的数
代码:
#include<stdio.h>
#include<stdlib.h>
typedefstruct BSTreeNode
{
int Value;
struct BSTreeNode *pLeft;
struct BSTreeNode *pRight;
}*pBSTreeNode,BSTreeNode;
void FindNthMax(pBSTreeNode root,int &N,int &Result)