Recursive solution

I am thinking to form recursive way for this? now if i calculate sum of whole array
then?