Search:

Type: Posts; User: alex_bin

Search: Search took 0.10 seconds.

  1. Replies
    13
    Views
    1,170

    [SOLVED] Re: nary tree from string

    Thnx Greg, did the corrections. One more thing though,

    My code :


    import java.util.ArrayList;
    import java.util.List;
    import java.util.*;
    /**
    *
  2. Replies
    13
    Views
    1,170

    [SOLVED] Re: nary tree from string

    Why I am getting ArrayIndexOutOfBoundsException:37 at Line 23 ?



    import java.util.ArrayList;
    import java.util.List;
    import java.util.*;
    /**
    *
    * @author User1
  3. Replies
    13
    Views
    1,170

    [SOLVED] Re: nary tree from string

    Thanks for correcting, Now I am getting the correct root but the children of the tree are all the characters.
    Considering the character array



    char...
  4. Replies
    13
    Views
    1,170

    [SOLVED] Re: nary tree from string

    oops.. it should have been k instead of i.. (thanks)




    import java.util.ArrayList;
    import java.util.List;
    import java.util.*;
    /**
    *
  5. Replies
    13
    Views
    1,170

    [SOLVED] Re: nary tree from string

    Line 51 is showing the error... It was accessing index -1
    fixing that with while (p>0) gives me new error java.lang.OutOfMemoryError: Java heap space at line 54

    I humbly ask you to check if I am...
  6. Replies
    13
    Views
    1,170

    [SOLVED] Re: nary tree from string

    I have tried implementing the algo... but i m sure somewhere something is seriously wrong..
    It is giving me ArrayIndexOutOfBoundsException

    Please check if I have implemented the algo properly or...
  7. Replies
    13
    Views
    1,170

    [SOLVED] Re: nary tree from string

    nary tree is the tree having upto n number of children

    In a nutshell,

    I am trying to create a nary tree from strings like :
    (ROOT(S(VP(VB LT)(ADVP LT))(VP(PP(NP X)))))

    The complete tree...
  8. Replies
    13
    Views
    1,170

    [SOLVED] nary tree from string

    hey all,

    I am trying to create a nary tree from string following some rules.

    It takes the stored character string as input and generates an output tree. We keep on pushing alphabets onto...
Results 1 to 8 of 8