Fixed typo.
Fixed typo.
Fixed type, added time limit, more statistics, use

semi-external construction of WT for D array
(to handle large cases with less memory)