Question: I need in in java by not comlicated code and not handwriting please Thank you Write a java method that will take two sorted stacks
I need in in java by not comlicated code and not handwriting please
Thank you

Write a java method that will take two sorted stacks A and B (min on top), and return one stack D that is sorted (min on top). You are allowed to use only the stack operations such as pop, push, isEmpty and peek. Example: suppose A= {(top)1, 4, 7, 9} and B={(top)2, 3, 6}, then the function will return a new stack D={(top) 1, 2, 3, 4, 6, 7, 9}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
