Description

number_to_string and string_to_number must be edited in such a manner that the test functions all work

NOTE: You can not edit the test functions!!

The algorithm to compute the path to a particular pair of integers (m, n) is rather simple:

  1. Begin with a pair of integers (m,n) and let S = ‘ ‘ be the empty string
  2. If m < n set n to be n-m and add L on to the end of S (S?SLS?SL)
  3. If m > n, set m to be m-n and add R on to the end of S (S?SRS?SR)
  4. If m = n, the process stops and the path S is found
  5. Until this happens, repeat step 2 or 3 depending on the condition