英文原题:writeaprogramtocombinetwostacksbyplacingallelementsofthesecondstackontopofthoseinthefirst.Therelativeorderingofelementsfromthesecondstackisunchanged.Followingthecombine,thesecondstackisempty.(Hint:youcanusepushandpopmethodsofthosestacksdirectly)意思是:栈1存有1,2,3,4,5;栈2存有6,7,8,9,10;如何让栈2中的原有数据保持顺序不变而放入栈1中;实现效果是:栈1存有1,2,3,4,5,6,7,8,9,10;栈2为空;能贴上c++代码最好
蝴蝶不菲
潇潇雨雨
相关分类