Archive for November, 2011

C++ Sudoku solver updated–optimized set implementation

November 25, 2011 Leave a comment

For Sudokus of moderate sizes it is possible to replace the standard set implementation and use the bits in an integer instead. The purpose of this would be to gain performance at the cost of limiting the board size to 32×32 (or 64×64 on a 64 bit processor). I tried it out today and the result was not bad at all; the optimized set implementation was more than twice as fast:


Again the source code is available on

I tagged the old version as 1.0 and this new optimized version as 2.0.

Categories: Uncategorized

A Sudoku solver in C++

November 24, 2011 Leave a comment

I just published source code for a Sudoku solver in C++ on bitbucket. Check it out on:

The most interesting aspect, comparing this one with my previous solvers, (besides that it is written in C++ of course) is that it supports generic board sizes. The source code contains one example of a 16×16 puzzle.

Categories: Uncategorized

Import a local repository into Bitbucket

November 24, 2011 3 comments

Personal notes. Might help someone else though.

  1. Start up a virtual server on your router:
    1. Get address of router; run ipconfig.exe and look at standard gateway. Mine is
    2. Open a web browser and surf to (or what ever the address of the router was)
    3. Login as administator
    4. Click advanced and create a virtual server. Select port 8000 which is default for tortoise hg web servers (see below).
  2. Start up your tortoise hg web server, simply by right click in windows explorer in your repository and select web server.
  3. Get your public ip; i.e. surf to
  4. Login to bitbucket and select import repository. Use url http://{public-ip}:8000.

When all is done you may want to disable the virtual server again.

Categories: Uncategorized