Bookmark Topic Watch Topic
  • New Topic

Files with data range  RSS feed

 
Jacob Sonia
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have a .txt file containing data in the form of
startrange,endrange,id

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.
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please UseOneThreadPerQuestion. Duplicate of this.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!