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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -