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

4
LINES

< > BotCompany Repo | #1023715 // moveElementToBeginningIC - could be optimized even further

JavaX fragment (include)

static LS moveElementToBeginningIC(S a, Collection<S> l) {
  if (!contains(l, a)) ret asList(l);
  ret listPlus_inFront(listMinusElementIC(a, l), a);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023715
Snippet name: moveElementToBeginningIC - could be optimized even further
Eternal ID of this version: #1023715/5
Text MD5: 8d20f633e7f059954b0a8fc9721ba28d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-04 11:30:50
Source code size: 154 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 266 / 322
Version history: 4 change(s)
Referenced in: [show references]