Socket
Socket
Sign inDemoInstall

sudoku-c

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sudoku-c

As fast as possible sudoku solver and generator using the backtracking algorithm. It's a native node.js extension written in C.


Version published
Weekly downloads
18
decreased by-14.29%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

sudoku-c Build Status Coverage Status

As fast as possible sudoku solver and generator using the backtracking algorithm. It's a native node.js extension written in C.

Installation

npm install sudoku-c

Usage

var sudoku = require('sudoku-c');

// generate random grid - an array of 81 (9x9) integers
sudoku.generate();

// replace 54 random values with 0
sudoku.classic(sudoku.generate(), 54);

// solve given grid
sudoku.solve([
  0, 0, 0, 0, 6, 0, 1, 7, 0,
  8, 0, 0, 9, 0, 0, 0, 0, 0,
  3, 0, 5, 0, 0, 4, 6, 0, 0,
  0, 0, 4, 1, 0, 7, 0, 5, 0,
  2, 0, 0, 0, 0, 0, 0, 0, 1,
  0, 6, 0, 4, 0, 5, 3, 0, 0,
  0, 0, 1, 6, 0, 0, 7, 0, 8,
  0, 0, 0, 0, 0, 9, 0, 0, 2,
  0, 4, 9, 0, 8, 0, 0, 0, 0
]);

Keywords

FAQs

Last updated on 21 Jul 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc