Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 6 Online
OpenStudy (anonymous):

I can't get through assign. 3 in the recursive manner. Any hints?

OpenStudy (anonymous):

can u tell the question or send link to it?

OpenStudy (anonymous):

There are assignments in: http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/ No 3 is called 'matching strings...' There is a request to prepare a python code to find the string inside the longer string in a recursive manner. I did the iterative one but make up the other one. Is there any hint?

OpenStudy (anonymous):

i wouldn't tell the solution. but a hint decide a base case(i.e where finally 'find' function returns -1) put base case in if statement and in else statement call that function again but with string truncated from the part where it has already counted. Think again How many arguments do u need to pass?

OpenStudy (anonymous):

Thanks to your hint I managed to find the answer! Thanks!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Countless7Echos: Ah trying out the whole T.V girl drawing :p (I love drawing eyes)
3 hours ago 13 Replies 6 Medals
kaelynw: starting to draw a hand
12 hours ago 17 Replies 2 Medals
Twaylor: Rate it :D (Took 2 days)
4 days ago 7 Replies 0 Medals
XShawtyX: Art, Short Writing Assignment: Imagining Landscapes
25 minutes ago 9 Replies 1 Medal
XShawtyX: Chemistry, Help ud83dude4fud83cudffe
5 days ago 13 Replies 1 Medal
kaelynw: tried a lil smt, the arm is off but i like the other stuff
5 days ago 27 Replies 3 Medals
kaelynw: art igg
5 days ago 14 Replies 1 Medal
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!