Discussion Board
There are no previous messagesGo to the following message
Current Forum: Homework 3 Forum
Date: Wed Sep 26 2001 6:34 pm
Author: Dozzi, Giancarlo <gdozzi@andrew.cmu.edu>
Subject: search method

For the search method, are we simply supposed to return the line number of the first occurence of the word from a certain line on? i.e.:

1 dog cat
2 eat fence
3 dog dog tree
4 i am a dog
5 nothing here

search(1) returns 1
search(2) returns 3
search(5) returns -1

Is this correct?
Post response

There are no previous messagesGo to the following message
Current Thread Detail:
search method      Dozzi, Giancarlo      Wed Sep 26 2001 6:34 pm       
Re: search method      Chen, Richard      Thu Sep 27 2001 12:21 am       
Re: search method      White, David      Thu Sep 27 2001 11:54 am       
Re: search method      Yuen, John      Thu Sep 27 2001 12:09 pm       

Back to previous screen