Question: Add a function member common Elements() for the linked stack class. The function returns a linked stack which contains the elements that two stacks share

Add a function member common Elements() for the linked stack class. The function returns a linked stack which contains the elements that two stacks share in common (assuming that both stacks contain no duplicate elements). Here is a sample function call: LStack intersect = stackA.common Elements(stackB); The function header may look like the following: L Stack common Elements(const L Stack& another) Add a function member common Elements() for the linked stack class. The function returns a linked stack which contains the elements that two stacks share in common (assuming that both stacks contain no duplicate elements). Here is a sample function call: LStack intersect = stackA.common Elements(stackB); The function header may look like the following: L Stack common Elements(const L Stack& another)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
