static S longestString(Collection<S> l) { S longest = null; int n = -1; if (l != null) for (S s : l) { int len = l(s); if (len > n) { n = len; longest = s; } } ret longest; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1012827 |
Snippet name: | longestString |
Eternal ID of this version: | #1012827/3 |
Text MD5: | 6d8f682dd014dc7b748aacf8e05e551d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-14 00:09:54 |
Source code size: | 219 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 355 / 383 |
Version history: | 2 change(s) |
Referenced in: | [show references] |