Skip to content

Instantly share code, notes, and snippets.

View jlhonora's full-sized avatar

Jose Luis Honorato jlhonora

View GitHub Profile
@jlhonora
jlhonora / gist:9261278
Last active August 29, 2015 13:56
Coding for Interviews #20
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/**
* Solution for "Coding for Interviews" challenge 20.
Consists of creating a queue using two stacks.
I declare the first stack as "downwards" and the
second one as "upwards". If we need to enqueue we just
add to the "downwards" stack. If we need to dequeue then