Function to return the stack that contains the sum of two numbers
static Stack < Integer > addStack ( Stack < Integer > N1 , Stack < Integer > N2 ) { Stack < Integer > res = new Stack < Integer > ( ) ; int sum = 0 , rem = 0 ; while ( ! N1 . isEmpty ( ) && ! N2 . isEmpty ( ) ) {