結果 : write a function for dynamic implementation of stack in data structure