|
Until you sign up you can't do much. Yes, it's free.
|
|
|
|
|
|
|
 | / / / Viewing Topic
|  |
( matto )
Soothsayer
Patron
Tech Support Leader
|
So I'm doing this problem, and I've entered the code: | Code: | public int strDist(String str, String sub) { if( str.length()==0 ) return 0; if( !(str.substring(0, sub.length()).equals(sub)) ) { return strDist( str.substring(1, str.length()), sub); } if( !( str.substring( str.length()-sub.length(), str.length()).equals(sub) ) ) { return strDist( str.substring(0, str.length()-1), sub); } return str.length(); } | And it passes all the tests except "other tests," which isn't useful since I don't know what's causing it to break. Any ideas? This is not kewl. :(
------- "You're a bold kid, Arnold. A bold kid." --Gerald
|
8:04 pm on Nov. 12, 2008 | Joined Aug. 2007 | 309 Days Active Join to learn more about matto California, United States | Bi-curious Male | 6304 Posts | 11940 Points
|
|
| |
|
|
|
|
bratalvarado
Quality Control Engineer
|
wait what is this about
------- im the vampire not u others, ill bite u
|
|
|
Majo
Soothsayer
|
I wish I understood that but Java I kicked my ass, sorry.
------- "Under the hardness of her facade a woman's heart is still beating."
|
8:09 pm on Nov. 12, 2008 | Joined May 2005 | 287 Days Active Join to learn more about Majo Pennsylvania, United States | Straight Female | 6541 Posts | 11403 Points
|
|
| |
|
|
|
|
( matto )
Soothsayer
Patron
Tech Support Leader
|
yawtf. I'm trying to come up with a situation that'd cause it to fail... can't think of anything.
------- "You're a bold kid, Arnold. A bold kid." --Gerald
|
8:32 pm on Nov. 12, 2008 | Joined Aug. 2007 | 309 Days Active Join to learn more about matto California, United States | Bi-curious Male | 6304 Posts | 11940 Points
|
|
| |
|
|
|
|
|
|
|
|
|
| Looking for something else?
|
|
|
|
|
|
 | / / / Viewing Topic |  |
|