Hi Alex Yip. Instead of implementing / building upon one of the Queues I created in the previous videos (which if you want you can use), I thought it would be easier for people who missed those videos to use a class built into Java's API documentation. With that being said, I chose an ArrayDeque as an Array based solution. Now, there are some performance differences regarding a LinkedList and an ArrayDeque in Java. (Excluding their general time/space efficiency differences). These differences have more to do with Java than the data structures themselves. You can always look further into it if you wish. The key to take away though is that the general time/space differences between and array and linked list still hold. Hope this helps :)
awesome video!
I'm glad it helped, dimaz2k! :)
Can you talk about why you are using a arraydeque ?
Hi Alex Yip. Instead of implementing / building upon one of the Queues I created in the previous videos (which if you want you can use), I thought it would be easier for people who missed those videos to use a class built into Java's API documentation. With that being said, I chose an ArrayDeque as an Array based solution. Now, there are some performance differences regarding a LinkedList and an ArrayDeque in Java. (Excluding their general time/space efficiency differences). These differences have more to do with Java than the data structures themselves. You can always look further into it if you wish. The key to take away though is that the general time/space differences between and array and linked list still hold.
Hope this helps :)