#include "splay.h" #include #define NumItems 10 SplayTree T; int main(int argc, char *argv) { SplayTree P; int x; T = Initialize( ); T = MakeEmpty( T ); T = Insert( 99, T ); MyPrintTree(T); T = Insert( 88, T ); MyPrintTree(T); T = Insert( 77, T ); MyPrintTree(T); T = Insert( 66, T ); MyPrintTree(T); T = Insert( 55, T ); MyPrintTree(T); T = Insert( 44, T ); MyPrintTree(T); while (1) { printf("Enter find item: "); scanf("%d", &x); T = Find( x, T ); MyPrintTree(T); } return 0; } void PrintMyTree() { printf("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n"); MyPrintTree(T); printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); }