1 | static int getNumberOfEqualCharacters(S a, S b) {
|
2 | int score = 0, n = min(l(a), l(b)); |
3 | for (int i = 0; i < n; i++) |
4 | if (a.charAt(i) == b.charAt(i)) |
5 | ++score; |
6 | ret score; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1004718 |
| Snippet name: | getNumberOfEqualCharacters |
| Eternal ID of this version: | #1004718/1 |
| Text MD5: | 68cd313c71caa3c97933e761df42665c |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-08-27 22:45:35 |
| Source code size: | 189 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 880 / 910 |
| Referenced in: | [show references] |