Longest common prefix: Difference between revisions
Content deleted Content added
→{{header|Go}}: Add Go |
→{{header|Go}}: clarify why 'min' is the right answer for the final return statement |
||
Line 52: | Line 52: | ||
} |
} |
||
} |
} |
||
// In the case where lengths are not equal but all bytes |
|||
// are equal, min is the answer ("foo" < "foobar"). |
|||
return min |
return min |
||
} |
} |