1 | static int ai_countIdenticalWords(S a, S b) { |
2 | LS tokA = javaTokWithBrackets_cached(a); |
3 | LS tokB = javaTokWithBrackets_cached(b); |
4 | if (l(tokA) != l(tokB)) ret 0; |
5 | int score = 0; |
6 | for (int i = 1; i < l(tokA); i += 2) |
7 | if (eqic(tokA.get(i), tokB.get(i))) ++score; |
8 | ret score; |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021254 |
Snippet name: | ai_countIdenticalWords |
Eternal ID of this version: | #1021254/1 |
Text MD5: | 059254b2ba20e291da301c7493b241d8 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-06 11:53:30 |
Source code size: | 292 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 300 / 343 |
Referenced in: | [show references] |