daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Dec 18th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class PrefixTree {
  2.     private PrefixTree left;
  3.     private PrefixTree rigth;
  4.     private char character;
  5.  
  6.     public PrefixTree(PrefixTree left, PrefixTree rigth, char character) {
  7.         this.left = left;
  8.         this.rigth = rigth;
  9.         this.character = character;
  10.     }
  11.  
  12.     public void print() {
  13.         System.out.print(this.character);
  14.         if (this.left != null) {
  15.             this.left.print();
  16.         }
  17.         if (this.rigth != null) {
  18.             this.rigth.print();
  19.         }
  20.     }
  21.  
  22.     public static void main(String[] args) {
  23.         // 1. Распечатать дерево из задания
  24.     }  
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top