Block shuffle sort
The block shuffle sort is a (rather artificial) method of sorting a list. It works as follows, illustrated by an example.
[6, 1, 0, 3, 2, 4, -2, -1]
Break list into contiguous blocks
[6][1, 0][3, 2, 4][-2, -1]
Sort each block
[6][0, 1][2, 3, 4][-2, -1]
Sort blocks lexicographically
[-2, -1][0, 1][2, 3, 4][6]
Concatenate
[-2, -1, 0, 1, 2, 3, 4, 6]
The partition into contiguous blocks can be chosen arbitrarily. However, not all choices of blocks will yield a sorted list at the end:
[6, 1, 0, 3, 2, 4, -2, -1]
[6, 1, 0][3, 2, 4][-2, -1]
[0, 1, 6][2, 3, 4][-2, -1]
[-2, -1][0, 1, 6][2, 3, 4]
[-2, -1, 0, 1, 6, 2, 3, 4]
If all blocks have length 1, or if there is only one block, then the result will of course be sorted. But these are rather extreme cases. In this challenge, your task is to find a balance between the number of blocks and the maximum length of a block.
The task
Your input is a nonempty list of integers L, taken in any reasonable format. Your output shall be the smallest integer N such that L can be block shuffle sorted so that the number of blocks and the length of each block are at most N.
The lowest byte count in each language wins. Standard code-golf rules apply.
Test cases
[5] -> 1
[1,2] -> 2
[0,2,1,-1] -> 3
[-1,0,2,1] -> 2
[9,3,8,2,7] -> 4
[9,2,8,3,7] -> 3
[5,9,3,7,2,4,8] -> 7
[-1,-2,1,2,-1,-2,7] -> 4
[6,1,0,3,2,4,-2,-1] -> 4
[12,5,6,-6,-1,0,2,3] -> 3
[1,0,1,0,1,0,1,0,1,0] -> 6
[1,2,1,3,1,2,3,2,4,3] -> 5
[7,7,7,7,8,9,7,7,7,7] -> 4