mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-10-28 06:34:41 +00:00
auto commit
This commit is contained in:
+1
-1
@@ -505,7 +505,7 @@ public class WeightedQuickUnionUF {
|
||||
使用辅助函数 less() 和 exch() 来进行比较和交换的操作,使得代码的可读性和可移植性更好。
|
||||
|
||||
```java
|
||||
private static boolean less(Comparable v, Comparable w){
|
||||
private boolean less(Comparable v, Comparable w){
|
||||
return v.compareTo(w) < 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user