Split List
Given a list of integers nums
, return whether you can partition the list into two non-empty sublists such that every number in the left sublist is strictly less than every number in the right sublist.
Constraints
n ≤ 100,000
wheren
is the length ofnums
.
https://binarysearch.com/problems/Split-List
Examples
Example 1
Input
- nums =
[5, 3, 2, 7, 9]
Output
- answer =
True
Explanation
We can split the list into left = [5, 3, 2]
and right = [7, 9]
Leave a comment