Grokking Data Structures & Algorithms for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Is peek() necessary?

SK

Nov 29, 2023

Why are we using peek() instead of remove() and pop() ?

2

0

Comments
Comments
Roman Strijac
Roman Strijac2 years ago

is Stack necessary? for(...)  queue.Enqueue(queue.Dequeue());

On this page