Skip to content

Commit 6f51211

Browse files
committed
Improved 3382
1 parent b08e5c3 commit 6f51211

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/g3301_3400/s3382_maximum_area_rectangle_with_point_constraints_ii

1 file changed

+1
-1
lines changed

src/main/kotlin/g3301_3400/s3382_maximum_area_rectangle_with_point_constraints_ii/Solution.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Solution {
1111
if (xCoord.size < 4) {
1212
return -1
1313
}
14-
val pair = Array<Pair>(xCoord.size) { i -> Pair(0, 0) }
14+
val pair = xCoord.zip(yCoord) { x, y -> Pair(x, y) }.toTypedArray()
1515
for (i in xCoord.indices) {
1616
val x0 = xCoord[i]
1717
val y0 = yCoord[i]

0 commit comments

Comments
 (0)