datastructure: stack: adding code for generic stack implementation