Longest common prefix: Difference between revisions
Content added Content deleted
No edit summary |
(Change the lcp(a, "", b) case to have lcp(a, b) != ""; otherwise it's not testing what is desired) |
||
Line 12: | Line 12: | ||
lcp("throne","throne") = "throne" |
lcp("throne","throne") = "throne" |
||
lcp("throne","dungeon") = <math>\varepsilon</math> |
lcp("throne","dungeon") = <math>\varepsilon</math> |
||
lcp("throne",<math>\varepsilon</math>," |
lcp("throne",<math>\varepsilon</math>,"throne") = <math>\varepsilon</math> |
||
lcp("cheese") = "cheese" |
lcp("cheese") = "cheese" |
||
lcp(<math>\varepsilon</math>) = <math>\varepsilon</math> |
lcp(<math>\varepsilon</math>) = <math>\varepsilon</math> |