Skip to content

Update list reference#44

Open
Kikobeats wants to merge 1 commit intojamiebuilds:masterfrom
Kikobeats:patch-1
Open

Update list reference#44
Kikobeats wants to merge 1 commit intojamiebuilds:masterfrom
Kikobeats:patch-1

Conversation

@Kikobeats
Copy link
Copy Markdown

Instead of linked list.

I'm not sure about that but the implementation actually looks like list.

Maybe the commend was not updated?

Instead of linked list.
* Again, because this limits the amount of functionality, there are many
* different ways of implementing it. A good way might be to use a linked list
* which we will see later.
* different ways of implementing it. A good way might be to use a list.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be more relevant to the implementation presented.

Copy link
Copy Markdown

@abdulhannanali abdulhannanali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kikobeats Clarification from my side

* Again, because this limits the amount of functionality, there are many
* different ways of implementing it. A good way might be to use a linked list
* which we will see later.
* different ways of implementing it. A good way might be to use a list.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kikobeats In this comment he isn't referring to the current implementation which is indeed using list and is O(N) but instead clarifying that a good way to implement them would be a linked list. Although, the sentence itself is ambiguous and can be clarified if the author wants.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look out for the comment after the Queue implementation in which the author explains more about the current implementation and how it can be improved with the future Linked List implementation.

/**
  * The important thing to note here is that because we used a list to back our
  * queue it inherits the performance of "shift" which is linear O(N) "OKAY."
  *
  * Later we'll see linked lists that will allow us to implement a much faster
  * Queue.
  */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants