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? |
|