Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
day 13 code file
  • Loading branch information
404reese authored May 21, 2024
1 parent ba4f638 commit 70b67ac
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Day13_LeetCode334.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class Solution {
public boolean increasingTriplet(int[] nums) {
int first = Integer.MAX_VALUE;
int second = Integer.MAX_VALUE;

for (int num : nums) {
if (num <= first) {
first = num;
} else if (num <= second) {
second = num;
} else {
return true;
}
}
return false;
}
}

0 comments on commit 70b67ac

Please sign in to comment.