79770511

Date: 2025-09-20 19:07:40
Score: 2
Natty:
Report link

We can add multiple elements in a stack by using an array or arraylist as follows:

Stack<int[]> stack = new Stack<>();

For retrieval :

int[] elem = stack.peek() ; or stack.pop()

elem[0] , elem[1] ; however you want to access it .

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Riya Gusain