Algorithm · Snowflake · Medium
You have access to three operations that work on positive whole numbers: add(num) produces num + 2 sub(num) produces num - 2 split(num) produces floor(num / 2) For two positive integers, a and b, implement transform(a, b) to return any valid sequence of positive integers that changes a into b. Your returned sequence must contain the initial number a, all values encountered along the way, and the destination b. Finding the minimum-length sequence is not required. Examples…
Checking your access…