Created
May 20, 2018 15:07
-
-
Save ThanawatMas/8040a8c2c378e7cd657948ba694565f8 to your computer and use it in GitHub Desktop.
SolveByInnosense.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SolveByInnosense extends ConcurrentModificationSolution { | |
@Override | |
public void addItemAndReIndex(List<String> roundList, String newItem) { | |
for (String item : roundList) { | |
if (item.equals(newItem)) { | |
roundList.remove(item); | |
roundList.add(0, newItem); | |
} | |
} | |
} | |
@Override | |
public String solutionName() { | |
return "Innosense"; | |
} | |
public static void main(String[] args) { | |
SolveByInnosense innosense = new SolveByInnosense(); | |
innosense.solve(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment