java maze solving algos