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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:57:14+00:00 2026-05-27T19:57:14+00:00

Following is the Suffix array and LCP array information for string MISSISSIPPI . I

  • 0

Following is the Suffix array and LCP array information for string MISSISSIPPI. I know that LCP gives information about the lenght of the longest common prefix between str[i - 1] and str[i]. How Do I get longest common prefix length between any two arbitrary suffixes of this string. For example, I want longest common prefix between MISSISSIPPI and ISSIPPI

SA  LCP
12  0     $
11  0     I$
8   1     IPPI$
5   1     ISSIPPI$
2   4     ISSISSIPPI$
1   0     MISSISSIPPI$
10  0     PI$
9   1     PPI$
7   0     SIPPI$
4   2     SISSIPPI$
6   1     SSIPPI$
3   3     SSISSIPPI$
  • 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-27T19:57:15+00:00Added an answer on May 27, 2026 at 7:57 pm

    From http://en.wikipedia.org/wiki/Suffix_array, we have that “The fact that the minimum lcp value belonging to a consecutive set of sorted suffixes gives the longest common prefix among all of those suffixes can also be useful.” So in your case, the LCP between MISSISSIPPI and ISSIPPI is min(4, 0) = 0.

    You can find the minimum in a range in time O(1) via http://en.wikipedia.org/wiki/Range_Minimum_Query, and there is a lot of info on alternative approaches if you look at the TopCoder link there.

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

Sidebar

Related Questions

I have about 20 CSV's that all look like this: [email],[fname],[lname],[prefix],[suffix],[fax],[phone],[business],[address1],[address2],[city],[state],[zip],[setdate],[email_type],[start_code] What I've been
I've got an xml configuration file with the following file formats: <FILE FILEFORMAT=|PREFIX|DATETIME|-|STRING|NUMBER|_|DATETIME2|-|TIME|SUFFIX| />
I have this .NET regex: ^(?<prefix>([^]*))\s(?<attrgroup>(\([^\)]*\)))\s(?<suffix>([^]*))$ It properly matches the following strings: some prefix
I have filenames in following format: [ignore-prefix]-[important-middle]-[ignore-suffix]-[name-with-digits] I need to sort according to following
I'm trying to implement something that finds the common suffix between a number of
Following Izb's question about Best binary XML format for JavaME , I'm looking for
Given the following XML I need to place the contents of the suffix tag
I am using the following code... var Graphs:Array = new Array(contentMain.graph1, contentMain.graph2, contentMain.graph3, contentMain.graph4,
Does anyone know how I can get rid of the following assembler warning? Code
I am looking for a function that suits the following situation. What the script

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.