Change mid = N/2.0 to mid = (N-1)/2.0 in transform.cpp to make it AC