Skip to content

Commit

Permalink
fix two-pointers calculateMaxArea
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonStorm97 committed Jan 8, 2025
1 parent 35af0ef commit 3fc9ddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/wiki/algorithms/searching/two-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ move the pointer pointing to the shorter line inward to try and find a taller li
if (lHeight < rHeight) {
++left;
} else {
++right;
--right;
}
}
return maxArea;
}
int main() {
return calculateMaxArea({0, 10, 0, 5, 0}) == 50 ? 1 : 0;
return calculateMaxArea({0, 10, 0, 5, 0}) == 10 ? 1 : 0;
}
```

0 comments on commit 3fc9ddd

Please sign in to comment.