Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW ALGORITHM] Longest Common Prefix Under Strings #1804

Closed
2 tasks done
rajdeepchakraborty-rc opened this issue Nov 9, 2024 · 1 comment · Fixed by #1847
Closed
2 tasks done

[NEW ALGORITHM] Longest Common Prefix Under Strings #1804

rajdeepchakraborty-rc opened this issue Nov 9, 2024 · 1 comment · Fixed by #1847

Comments

@rajdeepchakraborty-rc
Copy link
Contributor

Issue will be closed if:

  1. You mention more than one algorithm. You can create a separate issue for each algorithm once the current one is completed.
  2. You propose an algorithm that is already present or has been mentioned in a previous issue.
  3. You create a new issue without completing your previous issue.

Note: These actions will be taken seriously. Failure to follow the guidelines may result in the immediate closure of your issue.


Name:

[Longest Common Prefix]

About:

This program finds the Longest Common Prefix (LCP) among an array of strings. It starts by assuming the first string as the prefix and iteratively compares it with each subsequent string, updating the prefix to the common portion. If no common prefix exists, it stops early. The program is useful for applications like string analysis, autocomplete systems, and pattern matching.

Input:

Enter the number of strings: 3
Enter the strings:
String 1: flower
String 2: flow
String 3: flight

Output:

The longest common prefix is: fl

Labels:

new algorithm, gssoc-ext, hacktoberfest, level1


Assignees:

  • Contributor in GSSoC-ext
  • Want to work on it
@pankaj-bind
Copy link
Member

assigned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants