Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita464cde

Browse files
add 1439
1 parent6cc532c commita464cde

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/main/java/com/fishercoder/solutions/_1439.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public static class Solution1 {
1313
* 2. priority queue doesn't help in this case unless used in combination with a set to filter out duplicates;
1414
* 3. implement a customized comparator for treeset: if sum i.e. entry[0] doesn't equal, then it's not a duplicate,
1515
* then we compare the rest of the elements in the array, as long as anyone of them differs at the same index, it's not a duplicate.
16+
*
17+
* Again, using a pen and paper to visualize my thought process helps a lot!
1618
*/
1719
publicintkthSmallest(int[][]mat,intk) {
1820
TreeSet<int[]>treeSet =newTreeSet<>(newComparator<int[]>() {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp