Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Array indexed exception for LongestCommonPrefix.java #158

Closed
Akhilj786 opened this issue Oct 18, 2015 · 3 comments
Closed

Array indexed exception for LongestCommonPrefix.java #158

Akhilj786 opened this issue Oct 18, 2015 · 3 comments

Comments

@Akhilj786
Copy link

The assumption made while coding is: 1st string will be smallest but i believe that wont be the case.
So we need to find the smallest string(in terms of length).
I have done something similar here:
https://github.com/Akhilj786/Algorithms/blob/master/src/DynamicProgram/LongestCommonPrefix.java#L11-L17

@blakeembrey
Copy link
Owner

You're absolutely right and this is probably a bug. You're welcome to submit a patch 👍

@blakeembrey
Copy link
Owner

@Akhilj786
Copy link
Author

👍

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

No branches or pull requests

2 participants