Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1004718 // getNumberOfEqualCharacters

JavaX fragment (include)

static int getNumberOfEqualCharacters(S a, S b) {
  int score = 0, n = min(l(a), l(b));
  for (int i = 0; i < n; i++)
    if (a.charAt(i) == b.charAt(i))
      ++score;
  ret score;
}

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: 649 / 669
Referenced in: [show references]