Skip to content

Instantly share code, notes, and snippets.

@rahulgupta-jsr
rahulgupta-jsr / min_stack.cpp
Last active May 13, 2018 18:04
Stack with const time get_min() function
#include <cstdlib>
#include <iostream>
#include <stack>
class CustomStack {
public:
void push(int num);
void pop();
int top();
#include <stdio.h>
struct container {
int var1;
char *var2;
void (*repr)(struct container *c);
};
void dumper(struct container *c) {
printf("var1=[%d]\t", c->var1);