이진탐색트리를 구현하는 프로그램을 작성하라.
- 최초 등록일
- 2019.11.08
- 최종 저작일
- 2019.09
- 5페이지/ 한컴오피스
- 가격 1,500원
* 본 문서(hwp)가 작성된 한글 프로그램 버전보다 낮은 한글 프로그램에서 열람할 경우 문서가 올바르게 표시되지 않을 수 있습니다.
이 경우에는 최신패치가 되어 있는 2010 이상 버전이나 한글뷰어에서 확인해 주시기 바랍니다.
소개글
"이진탐색트리를 구현하는 프로그램을 작성하라."에 대한 내용입니다.
visual studio
목차
없음
본문내용
using namespace std;
class linkedstack;
class linkedqueue;
class linkednode {
friend class linkedstack;
friend class linkedqueue;
private:
int data;
linkednode *link;
public:
linkednode(int x, linkednode *p)
{
data = x;
link = p;
}
};
class linkedstack { //링크 스택 관련 함수들
private:
linkednode * top;
public:
linkedstack()
{
top = 0;
}
void push(const int &x) //스택에 원소 삽입
{
top = new linkednode(x, top);
}
void pop() //스택에 원소 삭제
참고 자료
없음