Search Results

Search found 2 results on 1 pages for 'user1708762'.

Page 1/1 | 1 

  • unique substrings using suffix tree

    - by user1708762
    For a given string S of length n- Optimal algorithm for finding all unique substrings of S can't be less than O(n^2). So, the best algorithm will give us the complexity of O(n^2). As per what I have read, this can be implemented by creating suffix tree for S. The suffix tree for S can be created in O(n) time. Now, my question is- How can we use the suffix tree for S to get all the unique substrings of S in O(n^2)?

    Read the article

  • casting a node to integer

    - by user1708762
    The code gives an error saying that "no operator matches these two operands" in the if comparison statement. I interpret,it should mean that "a node can't be converted/casted into an integer". But, the print statement prints an integer value for w[2] when used with %d format. Why is that happening? Isn't printf casting it? NODE *w=(NODE *)malloc(4*sizeof(NODE)); if(w[2]==0) printf("%d\n",w[2]); The structure of the node is- struct node{ int key; struct node *father; struct node *child[S]; int *ss; int current; };

    Read the article

1