Hi Aniket,
From the code it is unclear what 'computeFFT' does. However looking at the code, I can tell that that by using sortrows they are trying to find the frequency with the largest magnitude.
To answer about the last statement, one has to look into how computeFFT is defined.
Hope it helps