This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |