Bro - after a while considered the complexity is O ( n*(n+1)/2 ). Explanation: Recursive operations on 1D array can be visualized like building triangular numbers because those are tiangular numbers. Jarmod was right my previous answer was wrong
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…