Skip to content

Instantly share code, notes, and snippets.

// http://www.codewars.com/kata/540afbe2dc9f615d5e000425/train/javascript
var Sudoku = function(data)
{
// Private methods
// -------------------------
var n = data.length;
var rows = data;
var collumns = calcCollumns(data);
var blocks = calcBlocks(data);
/**
* LazySingleton#getInstance instatiate a singleton on the first request.
*
* Due to the loading behavior of static fields, this aproach is guaranteed to be thread safe.
*/
public final class LazySingleton {
private static class InstanceHolder {
public static final LazySingleton INSTANCE = new LazySingleton();
}