Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Description: | |
/* | |
* This program takes a Sudoku puzzle solution as an input and then determines whether | |
* the puzzle solution is valid. This validation is done using both single thread and 27 threads. | |
* 27 threads are created as follows: | |
* 9 for each 3x3 subsection, 9 for the 9 columns, and 9 for the 9 rows. | |
* Each thread returns a integer value of 1 indicating that | |
* the corresponding region in the puzzle they were responsible for is valid. | |
* The program then waits for all threads to complete their execution and | |
* checks if the return values of all the threads have been set to 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var cfenv = require('cfenv'); | |
var app = express(); | |
var Promise = require('bluebird'); | |
var fs = Promise.promisifyAll(require('fs')); | |
var request = require('request-promise'); /* Note: using promise-friendly lib */ | |
var uuid = require('node-uuid'); | |
var appEnv = cfenv.getAppEnv(); | |
var util = require('util'); |