static Set<Char> commonCharactersInStrings(L<S> l) { Set<Char> set = null; for (S s : l) { new Set<Char> newSet; for i over s: { char c = s.charAt(i); if (set == null || set.contains(c)) newSet.add(c); } set = newSet; } ret set; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014397 |
Snippet name: | commonCharactersInStrings |
Eternal ID of this version: | #1014397/2 |
Text MD5: | d443a49f02ef260518f822e1c80da013 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-21 13:11:35 |
Source code size: | 286 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 416 / 443 |
Version history: | 1 change(s) |
Referenced in: | [show references] |