If less work is involved in searching a element than to sort and then extract, then we don?t go for sort
If frequent use of the file is required for the purpose of retrieving specific element, it is more efficient to sort the file.
Thus it depends on situation
Copyright ©CuriousTab. All rights reserved.