partition recursion
T(N) = 2T(N/2) + N ----> O(NlogN)
T(N) = 2T(N/2) + 1 ----> logN
T(N) = T(N/2) + 1 ----> logN
T(N) = T(N/2) + N ----> N
tail recursion
T(N) = T(N-1) + 1 ---> O(N)
T(N) = T(N-1) + N ---> O(N^2)
T(N) = 2T(N-1) + 1 ---> O(2^N)
T(N) = 2T(N/2) + N ----> O(NlogN)
T(N) = 2T(N/2) + 1 ----> logN
T(N) = T(N/2) + 1 ----> logN
T(N) = T(N/2) + N ----> N
T(N) = T(N-1) + 1 ---> O(N)
T(N) = T(N-1) + N ---> O(N^2)
T(N) = 2T(N-1) + 1 ---> O(2^N)