Fujitsu interview question

Time complexity of Stack vs Heap