1 | static int lCommonPrefix(S a, S b) {
|
2 | int i = 0; |
3 | while (i < a.length() && i < b.length() && a.charAt(i) == b.charAt(i)) |
4 | ++i; |
5 | ret i; |
6 | } |
Began life as a copy of #2000378
Snippet is not live.
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #2000587 |
| Snippet name: | lCommonPrefix |
| Eternal ID of this version: | #2000587/1 |
| Text MD5: | 025367f13cf303168f0e70bfa6a75e85 |
| Author: | stefan |
| Category: | |
| Type: | New Tinybrain snippet |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-04 03:20:27 |
| Source code size: | 149 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 793 / 177 |
| Referenced in: | [show references] |