I'm doing Ps 4 problem 4 right now from the 2011 course, and I'm having trouble understanding what they want me to do: The function find_best_shift seems to be the first one to work on, but they say to use find_best_shifts_rec, but find_best_shifts_rec seems to be exactly the same as find_best_shifts with the exception of requiring a start value for an argument. Can someone tell me what I am supposed to do here? it's possible I'm just not seeing something obvious, but I can't figure it out
yes you interpreted it right .....find_best_shifts_rec is a function that will start at random point and apply multiple shifts but every time starting from starting of a word. whereas all find_best_shifts does is to call the find_best_shifts_rec from the starting position 0. you should first write the code for find_best_shifts_rec then your code for .find_best_shifts will be just negligible in length.
Join our real-time social learning platform and learn together with your friends!