I have a .txt file containing data in the form of
Now, this file has huge data like 1 million records.
I want that if someone gives me a number, i can lookup in this file to check if it falls in the range of startrange and endrange and return them the id. Now this can happen very often, so i would like to parse this beforehand in a datastructure and have it ready so one can just query the datastructure after that, or please suggest me the best approach.
I feel that i should have a stringtoken beforehand split for each line and look for the tokens in each line and keep the locid. Please guide.