The problem with your approach is that this will lead to multiple repetitions for the same subarrays. Consider this sequence:
1 2 3 4 5
You will make recursive calls for these two subarrays:
2 3 4 5
1 2 3 4
which, in turn, includes recursive calls for them:
3 4 5
2 3 4
2 3 4 // duplicate!
1 2 3
which, in turn, includes:
4 5
3 4
3 4 // duplicate!
2 3
3 4 // duplicate!
2 3 // duplicate!
2 3 // duplicate!
1 2
., . , O (2 n), , O (n 2).
( " " ): n & times; n . "bottom" — 1, 2 .. , . n, , , - .
, (, m) ( m & min; 1 m +, 2), , n, n & times; n; , n & times; n ( , , ).