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 8043293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:51:21+00:00 2026-06-05T04:51:21+00:00

When running the algorithm on the string ‘ AEKEAAEKEAAEKEA$ ‘ looking for the longest

  • 0

When running the algorithm on the string ‘AEKEAAEKEAAEKEA$‘ looking for the longest substring with at least 3 occurences all the nodes in the suffix tree have maximum 2 branches, how can that be?

The correct result should be the substring ‘AEKEA‘.

You can easily see the tree in the online suffix tree builder

I just followed the Wikipedi description:

“The problem of finding the longest substring with at least k
occurrences can be found by first preprocessing the tree to count the
number of leaf descendants for each internal node, and then finding
the deepest node with at least k descendants”

What am I missing here?

Thank you.

  • 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-06-05T04:51:22+00:00Added an answer on June 5, 2026 at 4:51 am

    I don’t think that website is correct. When I run ‘AEKEAAEKEAAEKEA’ through my suffix tree, I get the following tree.

    └── (0)
        ├── (27) $
        ├── (6) A
        │   ├── (26) $
        │   ├── (16) AEKEA
        │   │   ├── (17) $
        │   │   └── (7) AEKEA$
        │   └── (18) EKEA
        │       ├── (19) $
        │       └── (8) AEKEA
        │           ├── (9) $
        │           └── (1) AEKEA$
        ├── (4) E
        │   ├── (24) A
        │   │   ├── (25) $
        │   │   └── (14) AEKEA
        │   │       ├── (15) $
        │   │       └── (5) AEKEA$
        │   └── (20) KEA
        │       ├── (21) $
        │       └── (10) AEKEA
        │           ├── (11) $
        │           └── (2) AEKEA$
        └── (22) KEA
            ├── (23) $
            └── (12) AEKEA
                ├── (13) $
                └── (3) AEKEA$
    

    As you can see from this branch, you’ve found your longest substring with 3 occurences.

    └── (0)
        ├── (27) $
        ├── (6) A
        │   ├── (26) $
        │   ├── (16) AEKEA
        │   │   ├── (17) $
        │   │   └── (7) AEKEA$
        │   └── (18) EKEA
        │       ├── (19) $
        │       └── (8) AEKEA
        │           ├── (9) $
        │           └── (1) AEKEA$
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following string: 0000015700 I need an algorithm that does the following:
I have implemented a sorting algorithm for a custom string that represents either time
I'm running an algorithm at the moment that is very heavy but extremely parallel.
I am running a parallel algorithm using light threads and I am wondering how
i am successfully running Parallel FPGroth Algorithm of Apache mahout on top of hadoop.
I'm running some tests comparing the sha1 algorithm implemented in javascript - got from
Need a running (moving, rolling) average algorithm to calculate the 5-minute average bits that
Running into a problem. I have a table defined to hold the values of
Why the c++'s implemented string::find() doesn't use the KMP algorithm (and doesn't run in
I have just written some code for approximate string matching. I would like to

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.