5/9

@fiveoutofnine

Joined on Mar 30, 2022

  • Description You are given a $5\times5$ array of random integers $\in [1, 10]$. Print out the elements of this array in a "swiss roll" order, i.e., starts down the first row, then goes down the last column, then left, up, etc. all the way until it curls its way to the centre element. Your LLM should do it directly without using any tools or code. Evaluation It is your job to take a given input and give a "swiss rolled" output. For example: Input: 8 7 9 3 4 4 7 3 3 3
     Like  Bookmark
  • Transacting on Ethereum is extremely expensive, so sometimes, it makes sense to aim for more granular control over your code. One way to achieve this is to utilize bit operations! They can also be quite useful outside of optimization. I’ve posted a few bit twiddling techniques to my Twitter @fiveoutofnine: quick/small mapping bitpacking consecutive data to reduce storage costs if blocks with 3 bit operations basic operations loop through some numbers without an array +extra These operations/tricks are pretty different from other aspects of coding, so it may be fairly esoteric to those without experience. Although I tried to give an application example with each Tweet, it’s still hard to see where/how to apply them yourself. A good example of a project with more extensive applications/context is my on-chain chess engine, but the contracts are probably a bit hard to follow for beginners.
     Like 12 Bookmark