Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7648573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:45:05+00:00 2026-05-31T10:45:05+00:00

i have found following code on online for suffix tree #include <stdio.h> #define E

  • 0

i have found following code on online for suffix tree

#include <stdio.h>
#define E 0

struct suffix_tree_node;


struct suffix_tree_link {
    // 0 is e - global index of during string's end
    unsigned long start;
    unsigned long end;
    suffix_tree_link(suffix_tree_node* source, suffix_tree_node* target, 
                     unsigned long start, unsigned long end) {
        this->source = source;
        this->target = target;
        this->start = start;
        this->end = end;
    }
    suffix_tree_node* source;
    suffix_tree_node* target;
    suffix_tree_link* next_link;
};

struct suffix_tree_node {
    suffix_tree_link* first_link;
    suffix_tree_node* parent_node;
    suffix_tree_node* suffix_link_node;

    // other constructors?
    suffix_tree_node() {
        parent_node = suffix_link_node = NULL;
        first_link = NULL;
    }

    void add_target(unsigned long start, unsigned long end, suffix_tree_node* target) {
        suffix_tree_link* link;
        for(link = first_link; link != NULL; link = link->next_link);
        link = new suffix_tree_link(this, target, start, end);
    }

};



class suffix_tree {

    suffix_tree_node* root;
    const char* string;

    void ukkonen() {
        root->add_target(1, E, new suffix_tree_node);
        unsigned long e = 1, j_i = 1, i = 1; 
        for( int i = 0; string[i] != '\0'; i++) {
            e++;
            for() {

                j_star = j;
            }

            j_i = j_star;
        }
    }

public:

    suffix_tree(const char* string) {
        root = new suffix_tree_node();
        this->string = string;
        ukkonen();
    }

};

int main() {
    suffix_tree("foof");
    return 0;
}

everything is clear almost in this code,because i have read about suffix tree many times before,but i did not understand this fragment:

void ukkonen() {
            root->add_target(1, E, new suffix_tree_node);
            unsigned long e = 1, j_i = 1, i = 1; 
            for( int i = 0; string[i] != '\0'; i++) {
                e++;
                for() {

                    j_star = j;
                }

                j_i = j_star;
            }
        }

what does this code do?

also what is for()? or j_start?

here is a link for this code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:45:07+00:00Added an answer on May 31, 2026 at 10:45 am

    You are looking at a work-in-progress. The code you posted hasn’t been completely written yet, and does not compile.

    A later version of that file can be found here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following code which I have found online def c_int_binary_search(seq,t): #
According to what I have found so far, I can use the following code:
Searching online, I have found the following routine for calculating the sign of a
I've found the following code online, int binary_search(int a[], int low, int high, int
On the MSDN, I have found following: public event EventHandler<MyEventArgs> SampleEvent; public void DemoEvent(string
I have found the following command in AWK useful in Vim :'<,'>!awk '{ print
I have found the following expression which is intended to modify the id of
I have found the following resources on Balanced Matching for .net Regexes: http://weblogs.asp.net/whaggard/archive/2005/02/20/377025.aspx http://blogs.msdn.com/bclteam/archive/2005/03/15/396452.aspx
Reading a book I have found the following statement: (Object) Behaviors answer either of
I'm converting an application to use Java 1.5 and have found the following method:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.