Skip to content

Instantly share code, notes, and snippets.

@pplanel
pplanel / bst.c
Created April 3, 2016 03:40
binarySearchTree
#include <stdlib.h>
#include "bst.h"
void insert_into_tree(struct node **root, char *value)
{
// Caso a arvore esteja vazia (root==NULL) vamos criar um no
// auxiliar, setar seus dois ponteiros (left, right) para NULL
// e apontar root para este novo nó.
if(*root == NULL)
{
@pplanel
pplanel / golang_job_queue.md
Created February 11, 2016 03:01 — forked from harlow/golang_job_queue.md
Job queues in Golang
@pplanel
pplanel / fizzbuzz
Last active February 19, 2017 17:36
FizzBuzz in 113 chars of Python
print ["%.0d%s%s"%(i if i%3 and i%5 else 0,"" if i%3 else "Fizz","" if i%5 else "Buzz")for i in range(-50, 50)]
#include <iostream>
#include <sstream>
#include <random>
#include <map>
using namespace std;
char toChar(int n) {
return n + '0';
}