Good evening everyone!
I ran into a strange looking problem the other day. It involves the use of a special recursive function called the necklace problem. Heard it's supposed to be a famous math problem. Anyways. The thing is, I have to input two numbers, the first one to fill in the tens value place, and the second number to fill in the ones value place. To get the next number, I have to add the two previous numbers and only use the number in the ones place value, but it has to stop if you see the same two numbers in the beginning. So only the numbers of the ones place value are used. I am very close to getting it, but the condition to stop my loop doesn't seem right.
I seem to be very close to getting it right. What's the correct boolean condition to stop it? Suggestions/ideas/solutions all welcomed if possible