clojure - What's an efficient way to store a chessboard in LISP? -


what's efficient way store chessboard in lisp example solve 8-queens puzzle?

for 8 queens problem, most efficient storage going array of 8 bytes. clojure provides byte-array method simplify process of creating such array. treat each byte array of 8 bits, , use 0 empty square , 1 queen.

this not work if intend use more 1 type of chess piece; additionally, should consider different approach if want variable board sizes.


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -