Skip to content

Instantly share code, notes, and snippets.

View tasti's full-sized avatar

Tasti Zakarie tasti

View GitHub Profile

Keybase proof

I hereby claim:

  • I am tasti on github.
  • I am tasti (https://keybase.io/tasti) on keybase.
  • I have a public key whose fingerprint is A912 E492 A876 6CED B340 CB05 138C 4153 9B31 F98B

To claim this, I am signing this object:

@tasti
tasti / mst
Last active August 29, 2015 14:09
Minimum spanning tree using Prim's Algorithm
"""
Produce a minimum spanning tree of the following graph. You do not need to show your work.
(Source: A portion of the map of germany from the board game Power Grid.)
"""
def primsalgorithm(graph):
if len(graph) == 0:
return {}
# Let v be an arbitrary vertex, let T be the tree consisting of just v
@tasti
tasti / Debouncer.java
Created September 20, 2014 08:39
A debouncer for Android.
import android.os.Handler;
public class Debouncer {
private Handler handler = null;
public Debouncer() {
this.handler = new android.os.Handler();
}