Skip to content

Instantly share code, notes, and snippets.

View JacAbreu's full-sized avatar

Jacqueline Abreu JacAbreu

  • Rio de Janeiro - Brasil
View GitHub Profile
public class Main {
private static boolean trySet(String input, int i, char[] data, boolean[] v, boolean[] h, boolean[] c, int value) {
int vv = i % 9 * 9, hh = i / 9 * 9, cc = (i / 27 * 3 + i % 9 / 3) * 9;
if (v[vv + value] || h[hh + value] || c[cc + value]) return false;
data[i] = (char) (value + '1');
v[vv + value] = h[hh + value] = c[cc + value] = true;
if (solveInternal(input, i + 1, data, v, h, c))
@klauswuestefeld
klauswuestefeld / gist:1595701
Created January 11, 2012 17:22
O Ciclo Vicioso Do Software Retranqueiro
We couldn’t find that file to show.