This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |