Piet Souris wrote:if monkey 0 processes value 200, and should send it to monkey 1, that has a dividableBy 13, then you do not need to send that 200, but 200 % 13 = 5
Tim Cooke wrote:...idea does work for the very next monkey but not for other monkeys after that. Might there be something else you can do to the worry level that will work for all monkey tests?
Mike Simmons wrote:Tim C's hints are exactly on target for this one.
Mike Simmons wrote:But why? It's still a fun, worthwhile exercise - hints or no.
If exactly one value is an integer, convert the integer to a list which contains that integer as its only value, then retry the comparison. For example, if comparing [0,0,0] and 2, convert the right value to  (a list containing 2); the result is then found by instead comparing [0,0,0] and .
If both values are lists, compare the first value of each list, then the second value, and so on. If the left list runs out of items first, the inputs are in the right order. If the right list runs out of items first, the inputs are not in the right order. If the lists are the same length and no comparison makes a decision about the order, continue checking the next part of the input.
== Pair 2 ==
- Compare [,[2,3,4]] vs [,4]
- Compare  vs 
- Compare 1 vs 1
- Compare [2,3,4] vs 4
- Mixed types; convert right to  and retry comparison
- Compare [2,3,4] vs 
- Compare 2 vs 4
- Left side is smaller, so inputs are in the right order
Tim Cooke wrote:...and I hope..
Stephan van Hulst wrote:If you need help with part 2, the hint I gave earlier in this topic turned out to work well for me, and it even outperformed the solution I had for part 1.