How can i Delete sequences from stack or queue? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i Delete sequences from stack or queue?

Code

19th Jan 2018, 11:35 PM
דוד סקבירסקי
דוד סקבירסקי - avatar
3 Answers
+ 5
Totally depends on language and whether you coded it or are using a library. Please edit this post to add enough information to get realistic answer. https://www.sololearn.com/Discuss/333866/?ref=app
20th Jan 2018, 12:09 AM
John Wells
John Wells - avatar
0
In java, you have stack that ordered like this: 1,1,2,2,2,3,3,3,4,4 Turn it to this: 1,2,3,4
20th Jan 2018, 10:55 AM
דוד סקבירסקי
דוד סקבירסקי - avatar
0
If you can also solve this problem in queue it will be realy good
20th Jan 2018, 10:57 AM
דוד סקבירסקי
דוד סקבירסקי - avatar