061.txt 949 B

1234567891011121314151617181920
  1. Cyclic Figurate Numbers algo:
  2. Just do a basic loop through everything, and when we get to a point where we get a hit on the last group, we exit and display the values
  3. The loops:
  4. Rules:
  5. Looping through each value in the first list, which for simplicity we will make separate from the other loops
  6. Given the current matching value, loop through all the values in each section.
  7. If we get a hit, add value to final list, and reccur with the hit set removed.
  8. We need to loops here:
  9. One outer loop that is in control of the index, if the index is greater than the the length of the list, then we are done
  10. Otherwise get the set, and pass that list along with the difference to the inner loop:
  11. Inner loop:
  12. Loop through all values in the set, each time we get a hit, then we call outer loop with index 0, added value...
  13. This seems like a decent way to do it now?
  14. Current continuation is for the outer loop btw...