Added documentation for timecomplexity