Showing tle for the first test case

Hello…
I am doing this 86. Partition List
question from leetcode.
I have come up with this code.


But it is showing tle for ([1,4,3,2,5,2] , 3) as input.
I am not able to get why it is showing so.
May be some infinite loop is going on but i am not able to find that.
I have done dry and run . May be something missing.
Thanks