# Chapter 8 - Can't find DoublyLinkedList class in the Sources folder

**URL:** <https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060>\
**Category:** Data Structures & Algorithms in Swift\
**Created:** [January 9, 2020, 4:43pm UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060 "2020-01-09T16:43:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkashiwagi](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mkashiwagi/32/81494_2.png) [@mkashiwagi](https://forums.kodeco.com/u/mkashiwagi)\
**Post date:** [January 9, 2020, 4:43pm UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060/1 "2020-01-09T16:43:50Z")

</div>

Hi in the example of the Doubly linked list implementation it mentions there is a DoublyLinkedList class in the Sources folder but I cannot see it, only the Array one.

---

<div class="post-metadata">

**Author:** ![itaylorm](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/itaylorm/32/83238_2.png) [@itaylorm](https://forums.kodeco.com/u/itaylorm)\
**Post date:** [January 30, 2020, 10:14pm UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060/2 "2020-01-30T22:14:01Z")

</div>

I also cannot find this file in source

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [March 27, 2020, 3:13pm UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060/3 "2020-03-27T15:13:37Z")

</div>

@jomoka Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![jomoka](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jomoka/32/109828_2.png) [@jomoka](https://forums.kodeco.com/u/jomoka)\
**Post date:** [March 29, 2020, 1:52pm UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060/4 "2020-03-29T13:52:40Z")

</div>

@mkashiwagi  
Sorry for the late reply! I double checked and the doubly linked list class is there. Did you check chapter 8 (Queue) queue project?

---

<div class="post-metadata">

**Author:** ![pulkitap](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pulkitap/32/81494_2.png) [@pulkitap](https://forums.kodeco.com/u/pulkitap)\
**Post date:** [May 28, 2020, 11:35am UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060/5 "2020-05-28T11:35:31Z")

</div>

@jomoka  
Any specific reason of using “DoublyLinkedList” for “Queue” implementation, instead of “Singular LinkedList”?

---

<div class="post-metadata">

**Author:** ![jomoka](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jomoka/32/109828_2.png) [@jomoka](https://forums.kodeco.com/u/jomoka)\
**Post date:** [June 2, 2020, 5:45am UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060/6 "2020-06-02T05:45:52Z")

</div>

@pulkitap

Depends on your use case. If you think about a normal list or array.

A doubly linked list would be useful if you wanted to remove an element at the start or end of the queue. (Since you have the reference to the tail node)

If you used a singly linked-list, to insert or remove elements, you would have to traverse the list till you reach the index to add/remove the node (since a node only has reference to the next node in a singly linked list)

Another example if you used a singly linked list, you can only traverse the list from the start.  
Where as if you used a doubly linked list, you will be able to traverse the list from the start or backwards from the end.

Picking the right data structure, you can consider complexity (big O Notation), order of elements(how to traverse the data structure), usage (How will your queue, or data structure will be used), performance (how fast is it to perform a particular function), memory (storage of data)

Hope this is helpful!

---

<div class="post-metadata">

**Author:** ![pulkitap](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pulkitap/32/81494_2.png) [@pulkitap](https://forums.kodeco.com/u/pulkitap)\
**Post date:** [June 3, 2020, 8:21am UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060/7 "2020-06-03T08:21:24Z")

</div>

@jomoka

For Queue implementation, we “enqueue” from tail and “dequeue” from head. And in singly linked list also, we have both, i.e. head as well as tail.  
Although, we can also implement it with doubly list, but doubly list requires much more space as compare to singly list.

---

<div class="post-metadata">

**Author:** ![jomoka](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jomoka/32/109828_2.png) [@jomoka](https://forums.kodeco.com/u/jomoka)\
**Post date:** [June 3, 2020, 3:55pm UTC](https://forums.kodeco.com/t/chapter-8-cant-find-doublylinkedlist-class-in-the-sources-folder/94060/8 "2020-06-03T15:55:35Z")

</div>

@pulkitap yes I agree doubly linked list requires more space due to the additional node references. If you just want a normal queue with standard fifo ordering. Then a single linked list works for this standard use case.

If all you care about is removing from the head then a single linked list is all you need.

It just depends on your use case.
