Skip to content

Commit

Permalink
Add max function in 1004
Browse files Browse the repository at this point in the history
  • Loading branch information
halfrost committed Apr 7, 2023
1 parent 796861b commit 171c28a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ func longestOnes(A []int, K int) int {
return res
}

func max(a int, b int) int {
if a > b {
return a
}
return b
}

```


Expand Down

0 comments on commit 171c28a

Please sign in to comment.