Skip to content

Instantly share code, notes, and snippets.

View maxskorr's full-sized avatar

Max Skorr maxskorr

View GitHub Profile
private boolean delete(Node<T> node, T value) {
if (node == null) {
return false;
}
if (value.compareTo(node.value) > 0) {
return delete(node.right, value);
}
if (value.compareTo(node.value) < 0) {
package binsearch;
import javafx.util.Pair;
import java.util.Arrays;
import java.util.Random;
import java.util.Stack;
/**
* Created by max on 15.09.15.
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
@maxskorr
maxskorr / backtrack.py
Created March 9, 2014 20:41
backtrack
MAX = 5
l = dict(zip(range(0, MAX), [False for i in xrange(0, MAX)]))
def backtrack():
for k in xrange(0, MAX):
if not l[k]:
l[k] = True
print k,
backtrack()