I hereby claim:
- I am x4nt on github.
- I am calcifer_demon (https://keybase.io/calcifer_demon) on keybase.
- I have a public key ASB6FRhtHqsLgGRP8CkHGe2aMrH3FPRjN8yn_SmegM6UCgo
To claim this, I am signing this object:
var palette = new Rickshaw.Color.Palette(); | |
var graph = new Rickshaw.Graph( { | |
element: document.querySelector("#chart"), | |
width: 550, | |
height: 250, | |
series: [ | |
{ | |
name: "dubstep", | |
data: [ { x: 1990, y: 0 }, { x: 1991, y: 0 }, { x: 1992, y: 0 }, { x: 1993, y: 0 }, { x: 1994, y: 0 }, { x: 1995, y: 0 }, { x: 1996, y: 0 }, { x: 1997, y: 0 }, { x: 1998, y: 0 }, { x: 1999, y: 0 }, { x: 2000, y: 1 }, { x: 2001, y: 1 }, { x: 2002, y: 0 }, { x: 2003, y: 1 }, { x: 2004, y: 2 }, { x: 2005, y: 6 }, { x: 2006, y: 21 }, { x: 2007, y: 26 }, { x: 2008, y: 41 }, { x: 2009, y: 48 }, { x: 2010, y: 36 }, { x: 2011, y: 0 } ], |
public class Solution { | |
public Map<Character, GraphNode> map = new HashMap<>(); | |
public Set<String> relations = new HashSet<>(); | |
public Set<GraphNode> visited = new HashSet<>(); | |
public Stack<GraphNode> topSort = new Stack<>(); | |
public String alienOrder(String[] words) | |
{ | |
for (int i = 0; i < words.length - 1; i++) |
I hereby claim:
To claim this, I am signing this object:
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQGNBFqV6E4BDADKqAHZA4fyBWh/f8CZ6J++F3aNpiOm2otRfCINMV3Sq+Qd6AZT | |
bkjSDDGTnukFVcz4QMzWY69CqvOZn4dAFTewCY9oIwVmzMDFpRXPuAGttwb0dF0q | |
CNWJLQpdhrgCZX556hxHqohOnHMnJZL7w6gpM3kJMB6IfRSkAyIVyTFQXT8PrP8A | |
8CBFRh/gQSe+dmsQhyR5pYmrQj0Lt+2DnBjZx+DDQr5X1dj5uMwES+ynXB6PNzlU | |
TI4ChB2n3Y5PhwuH5BlJjhy0dHikhS6XCeaTry4wbKNgbIBKFvRRxTFdfQlnAbLK | |
s38/XvAGtlbCDmFtB5bOzqoNy1y2vlQt3BODC465Erj/vkGS/h3ua+wC4mOnkdF3 |
extern crate num; | |
extern crate image; | |
extern crate crossbeam; | |
use image::ColorType; | |
use image::png::PNGEncoder; | |
use num::Complex; | |
use std::str::FromStr; | |
use std::fs::File; | |
use std::io::Write; |
Verifying my Blockstack ID is secured with the address 1HqBxWXEih8ob6PrEH4wCDMNto4TKTcJbn https://explorer.blockstack.org/address/1HqBxWXEih8ob6PrEH4wCDMNto4TKTcJbn |
class Solution | |
{ | |
public double[] calcEquation(String[][] equations, double[] values, String[][] queries) | |
{ | |
Map<String, Map<String, Double>> graph = new HashMap<>(); | |
double[] ret = new double[queries.length]; | |
for (int i = 0; i < equations.length; i++) { | |
String first = equations[i][0]; | |
String second = equations[i][1]; | |
if (!graph.containsKey(first)) { |
/* | |
This is just a small implementation of a Trie, used to store keys to an external map | |
in the 'leaves' of the tree. This can be used to make reverse lookup in a word map much | |
more efficient. | |
*/ | |
class Node { | |
constructor(val) { | |
this.val = val; | |
this.children = new Map(); | |
this.parent = null; |
use std::collections::HashMap; | |
use std::vec::Vec; | |
pub fn two_sum(nums: Vec<i32>, target: i32) -> Vec<i32> { | |
let mut seen = HashMap::new(); | |
for (i, num) in nums.iter().enumerate() { | |
let val = target - num; | |
match seen.get(&val) { | |
Some(&k) => return vec![k as i32, i as i32], |
public int[] findPermutation(String s) { | |
char[] c = s.toCharArray(); | |
int[] ret = new int[c.length + 1]; | |
int start = 0; | |
int low = 1; | |
int iIndex = 0; | |
while (start < c.length) | |
{ | |
// Look for our first 'I', increasing "low" so that | |
// later when we iterate to our 'I' index, decreasing low, we don't hit 0. |