A running example of the code from:
- http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang
- http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
Small refactorings made to original code:
#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) | |
{ |
A running example of the code from:
Small refactorings made to original code:
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'; | |
} |