Current Forum: Homework 3 Forum |
Date: Thu Sep 27 2001 12:03 pm |
Author: Yuen, John <jyuen@andrew.cmu.edu> |
Subject: Re: return line number of the next occurrence |
|
|
i don't quite understand what you mean. you ony parse the text file once. in that one pass you must get ALL the information you need. then when search is called you should search your trie and return the next line number. for instance, if the word "211" appears on lines 29 and 31 and we call search("211", 30) it should return 31. all this information should be kept in the trie. hope this helps. |
|