Skip to content

Instantly share code, notes, and snippets.

View santiagocasti's full-sized avatar

Santiago santiagocasti

View GitHub Profile
// Problem: Minimal Tree
// Given a sorted (increasing order) array with unique integer elements, write an algorithm to create a binary search tree with minimal height.
class Node {
Node left;
Node right;
int value;
public Node(int n) {
this.value = n;
// Problem: Route Between Nodes
// Given a directed graph, design an algorithm to find out whether there is a route between two nodes.
class Graph {
int size;
boolean[] adjacencyMatrix[];
public Graph(boolean adjacencyMatrix[][], int size) {
this.adjacencyMatrix = adjacencyMatrix;
### Keybase proof
I hereby claim:
* I am santiagocasti on github.
* I am san (https://keybase.io/san) on keybase.
* I have a public key whose fingerprint is BB67 EF5F 3193 23EF BD77 52D0 4C80 E618 3C12 818D
To claim this, I am signing this object: