New exercise: change

It’s not there yet. I just wanted to discuss the input and output format. While a uint8* buffer would be sufficient for the coin denominations in the tests, we could also increase the complexity a bit by using uint16 or uint32.

C#, Go and Java all use something akin to i32.

What’s your opinion?

1 Like

We can add extra test cases, with coin values that don’t fit in uint8.

When I added various test cases in arm64-assembly, my guide was that the example solution shouldn’t take more than a second to solve the exercise’s test cases. For wasm I would suggest an extra guide that solutions shouldn’t require more than 64kb of linear memory.

Those extra test cases:
affine-cipher
atbash-cipher
binary-search
collatz-conjecture
difference-of-squares
largest-series-product
nth-prime
pascals-triangle
perfect-numbers
prime-factors
pythagorean-triplet
raindrops
rectangles
resistor-color-trio
square-root

Should we then use u16 or u32?

We have freedom, this is up to you.

For helping our students gain fluency with more of Web Assembly, some variety here would be excellent. In another assembly track, we use a mix of 8/16/32/64

Then I’ll take u16 for the coins and u32 for the target.