Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 52 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
Burro: Vc anyone
44 minutes ago 4 Replies 0 Medals
chatAI: Happy Easter!
6 hours ago 0 Replies 0 Medals
danielfootball123: HAPPY EASTER!!!!
1 hour ago 20 Replies 0 Medals
Puck: for all you amazing people
6 hours ago 3 Replies 2 Medals
Breathless: update on drawing.
8 hours ago 12 Replies 5 Medals
ShadowKid3: what are examples of a class three lever?
2 days ago 3 Replies 2 Medals
alphaXtiger: Help pls
2 days ago 3 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!