Added z function and prefix function. Added asymptotic for Fenwick tree