Skip to content

Instantly share code, notes, and snippets.

View b00blik's full-sized avatar
🐺

Yuri b00blik

🐺
View GitHub Profile
@b00blik
b00blik / Scratch.java
Last active March 28, 2020 19:26
Binary Search Tree
class Scratch {
public static TreeNode bst(TreeNode root, int key) {
System.out.print(root.val + " -> ");
if (root == null || root.val == key) {
return root;
}
if (root.val > key) {
@b00blik
b00blik / Graph.java
Last active February 11, 2020 23:20
Exploring graphs
import java.util.*;
class Graph {
int V; //num. of Vertices
LinkedList<Integer> adj[]; //Adjacency lists
Graph(int v) {
V = v;
adj = new LinkedList[v];
@b00blik
b00blik / GraphDijkstra.java
Last active February 11, 2020 23:19
Dijkstra algo impl Java draft
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
public class GraphDijkstra {
final String START_NAME = "start";
final String FINAL_NAME = "final";
HashMap<String, HashMap<String, Integer>> graph;