Skip to content

Commit 9e67a2f

Browse files
committed
update cheatsheet/java_trick.md
1 parent 09724b8 commit 9e67a2f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/cheatsheet/java_trick.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,16 @@ _list2 = _list2.stream()
571571
// System.out.println(_list2);
572572

573573

574+
// V3
575+
// LC 731
576+
List<Integer[]> statusList;
577+
578+
statusList.sort((x, y) -> {
579+
if (!x[0].equals(y[0])) {
580+
return x[0] - y[0];
581+
}
582+
return x[1] - y[1]; // start (+1) comes before end (-1)
583+
});
574584

575585

576586

0 commit comments

Comments
 (0)