Q. Write an algorithm to insert element into

(i) Stack as a list

(ii) Queue as a list.


Answer =

(i). <stack name>.append(<item>)
(ii). <queue name>.append(<item>)

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post