Herah,
We are not overlykeen on spoonfeeding solutions here, we prefer to guide towards the solution, but not provide the solution.
Chris
Type: Posts; User: Freaky Chris
Herah,
We are not overlykeen on spoonfeeding solutions here, we prefer to guide towards the solution, but not provide the solution.
Chris
if maxLength is 0, you never update maxLength from 0. So all city names will be longer than zero, thus the last name you enter will also be returned. You need maxLength to change each time you find a...
if(length> maxLength)
longName = name;
You should also be setting max length to the length of the new longName perhaps....