Skip to content

Solution for 14th task - #561

Merged
GouravRusiya30 merged 2 commits into
codedecks-in:masterfrom
ViIsNotDev:solution_for_14th_task
Oct 14, 2026
Merged

GouravRusiya30 merged 2 commits into
codedecks-in:masterfrom
ViIsNotDev:solution_for_14th_task

Conversation

@ViIsNotDev

Copy link
Copy Markdown
Contributor

this PR adds a LeetCode problem solution with an implementation of the algorithm for the 14th LeetCode problem

Problem 14 : Longest Common Prefix

info about the problem:

difficulty : easy
approach : a for loop with a while loop, including std::string::find to see if there is any work needed to be done to actually find the longest common prefix
feature : an easy to understand, write, yet a fast algorithm for beginners
time complexity : O(n)
space complexity : O(n)

dependencies

no external dependencies required. everything used is in C++ STL

checklist

[x] added problem and solution under correct topic
[x] specified time and space complexity
[x] added test cases
[x] tested locally and passes all test cases

@GouravRusiya30
GouravRusiya30 merged commit 5643f64 into codedecks-in:master Oct 14, 2026
@welcome

welcome Bot commented Oct 14, 2026

Copy link
Copy Markdown

Your code looks great! Congrats, I've gone ahead and merged your first pull request! Keep it up! alt text

@ViIsNotDev
ViIsNotDev deleted the solution_for_14th_task branch October 14, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants