Thanks a lot for the explanation
what happens if the size were given like this 4 1 15 3 2? what will be the o/p?