moshix / queens

Implementations in various languages of the NxN queens problem.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord

Various Implementations of The Famous NxN Queens Problem



IBM mainframe assembler H
IBM VS2 Fortran
IBM PL/I Optimizing Compiler
IBM Algol68 Compiler
C Compiler
C++ Compiler
Python3 interpreter
the MVS 3.8 LUA interpreter


BUILD THE GOLANG VERSION

Assuming your golang environment is properly set up, it's as easy as: go build queens.go

RUN IT

Run it with

queens -h for help queens -s -n=12 to calculate the n=12 case queens -n=12 for all solutions from n=4 to n=12

queens is written in Golang 1.7 and runs fine on any *nix system. It uses backtracking to find queens.

It doesn't yet use Golang parallel features for multi-core machines, but it will soon.

ALL OTHER VERSIONS

Run either in MVS 3.8 TK4- or obtain the correct compilers. The algol68 compiler is among my GH repos.



Enjoy!

moshix
June 2024 / Firenze

About

Implementations in various languages of the NxN queens problem.


Languages

Language:Assembly 86.6%Language:Go 6.0%Language:C 2.2%Language:Python 2.2%Language:C++ 2.0%Language:Lua 0.9%