SHARE
TWEET

Untitled

a guest Aug 24th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.ArrayList;
  2. import java.util.HashMap;
  3. import java.util.List;
  4.  
  5. public class Node {
  6.     int start;
  7.     int end;
  8.     Node suffixlink;
  9.     HashMap<String,Node> children = new HashMap<>();
  10.     public Node next;
  11.     boolean isleaf = false;
  12.  
  13.    
  14.  
  15.     public Node(int start, int end) {
  16.        this.start = start;
  17.        this.end = end;
  18.     }
  19.    
  20.     public String getlabel(String s ) {
  21.         if(this.start == -1) return "root";
  22.         String label = s.substring(this.start, this.end) ;
  23.         return label;
  24.        
  25.     }
  26.     public Node() {
  27.        
  28.     }
  29.  
  30.    
  31. }
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