Skip to content

Instantly share code, notes, and snippets.

View kirkconnell's full-sized avatar

Carlos Kirkconnell kirkconnell

  • Google
  • Mountain View, CA
View GitHub Profile
Red/Black Tree implementation in GO
1- Write the tree.Add(int) function
2- Write a red black tree validator
- check if root is black
- check if the number of black nodes from the root to every nil is the same
- check that there are no two consecutive red nodes
3- Write the tree.Contains(int) function
$: time ruby cross_join.rb group_1.txt group_2.txt
a1d826a157c20ed6cb3d20292d5bc5b4, a1d826a157c20ed6cb3d20292d5bc5b4
real 6948m15.378s
user 6849m3.990s
sys 80m35.040s
$: time ruby hash_join.rb group_1.txt group_2.txt 100
a1d826a157c20ed6cb3d20292d5bc5b4, a1d826a157c20ed6cb3d20292d5bc5b4
" Color Scheme switch for linux
fu! ToggleLinuxColors()
if exists('base16colorspace') && base16colorspace == "256"
let s:base16colorspace = "mac"
else
let s:base16colorspace = 256
endif
exec "colorscheme base16-default"
endfu
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/iconsets/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {