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

9
LINES

< > BotCompany Repo | #1014405 // charactersAppearingExactlyOnceInEachString

JavaX fragment (include)

static Set<Char> charactersAppearingExactlyOnceInEachString(L<S> l) {
  Set<Char> set = null;
  for (S s : l) {
    Set<Char> newSet = asHashSet(keysWithValue(1, multiSetAsMap(asMultiSet(charsAsList(s)))));
    if (set != null) newSet = intersectSets(set, newSet);
    set = newSet;
  }
  ret set;
}

Author comment

Began life as a copy of #1014397

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: #1014405
Snippet name: charactersAppearingExactlyOnceInEachString
Eternal ID of this version: #1014405/3
Text MD5: cddf4af806263e96b458e35e9aa44a24
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:42:53
Source code size: 307 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 366 / 405
Version history: 2 change(s)
Referenced in: [show references]