Skip to content

Commit eb805b4

Browse files
committed
sort
1 parent e090462 commit eb805b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

colors/try-hard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export function getNodesWithReplacement(root, word) {
143143
}
144144
}
145145
}
146-
return all;
146+
return all.sort((a, b) => a.length - b.length);
147147
}
148148

149149
/**
@@ -167,7 +167,7 @@ export function getNodesWithSwap(root, word) {
167167
}
168168
}
169169
}
170-
return all;
170+
return all.sort((a, b) => a.length - b.length);
171171
}
172172

173173
/**

0 commit comments

Comments
 (0)