Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix smells
  • Loading branch information
ThanhNIT committed Jun 4, 2022
commit 0915b5e753038257ed3bc7be2834e2a366beb1d0
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public int minSwaps(int[] nums) {

int ws = ones[l - 1];
int minSwaps = Integer.MAX_VALUE;
int si = 0, ei;
int si = 0;
int ei;

while (si < nums.length) {
ei = (si + ws - 1) % l;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ private void preprocess(String[] words) {
}
}

private boolean matches(String word) {
return matches(getBitMap(word));
}

private boolean matches(int bitMap) {
return set.contains(bitMap);
}
Expand Down