Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doubly link list #32

Merged
merged 8 commits into from
Oct 8, 2019
Merged

doubly link list #32

merged 8 commits into from
Oct 8, 2019

Conversation

TheSTL
Copy link
Member

@TheSTL TheSTL commented Oct 5, 2019

🐻 What's inside?

Add doubly link list data structure having following functions:

  • addAtBeginning
  • addAtEnd
  • removeAtBeginning
  • removeAtEnd
  • remove argument node
  • length
  • display

Add LRU-cache data structure implementation.

  • get(key) O(1)
  • set(key, value) O(1)

@ashokdey
Copy link
Member

ashokdey commented Oct 5, 2019

Great move @TheSTL 👍

The first thing I want you to do is to remove the LRU implementation in a folder named _algorithms_. Meanwhile, I am reviewing the DLL implementation

@TheSTL
Copy link
Member Author

TheSTL commented Oct 5, 2019

@ashokdey
Changes are done.

@ashokdey
Copy link
Member

ashokdey commented Oct 5, 2019

You forgot to add entries in the README file! 🤒

Copy link
Member

@ashokdey ashokdey left a comment

Choose a reason for hiding this comment

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

Review is under process.

display() {
let address = this.head.next;
while (address !== this.tail) {
console.log(address.data);
Copy link
Member

Choose a reason for hiding this comment

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

no-console

Also, make sure the code adheres to ESLint rules.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a display function to print data in a linked list.

Copy link
Member

Choose a reason for hiding this comment

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

Add the comment to ignore the ESLint rule

@ashokdey ashokdey merged commit 65538e2 into master Oct 8, 2019
@ashokdey ashokdey deleted the DoublyLinkList branch October 8, 2019 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants