예제 #1
0
        //To Sort
        public ArrStack <Key> keys()
        {
            ArrStack <Key> q = new ArrStack <Key>(100);

            inorder(root, q);
            return(q);
        }
예제 #2
0
 private void inorder(Node x, ArrStack <Key> q)
 {
     if (x == null)
     {
         return;
     }
     inorder(x.left, q);
     q.push(x.key);
     inorder(x.right, q);
 }