-
Notifications
You must be signed in to change notification settings - Fork 0
LinkedList and Merge Sort #2
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
base: master
Are you sure you want to change the base?
Conversation
src/main/java/az/edu/turing/module02/tasks/linkedListOwn/service/impl/LinkedListImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/az/edu/turing/module02/tasks/linkedListOwn/service/impl/LinkedListImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/az/edu/turing/module02/tasks/linkedListOwn/service/impl/LinkedListImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls look
src/main/java/az/edu/turing/module02/tasks/linkedListOwn/model/Node.java
Show resolved
Hide resolved
src/main/java/az/edu/turing/module02/tasks/linkedListOwn/service/LinkedListInterface.java
Outdated
Show resolved
Hide resolved
src/main/java/az/edu/turing/module02/tasks/linkedListOwn/service/impl/LinkedListImpl.java
Show resolved
Hide resolved
src/main/java/az/edu/turing/module02/tasks/linkedListOwn/service/impl/LinkedListImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/az/edu/turing/module02/tasks/linkedListOwn/service/impl/LinkedListImpl.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| @Override | ||
| public void insert(int index, T item) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return inserted element,and make arguments final pls
| } | ||
|
|
||
| @Override | ||
| public void update(int index, T item) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return updated element,and make arguments final pls
| } | ||
|
|
||
| @Override | ||
| public void delete(int index) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return deleted element,and make arguments final pls
| } | ||
|
|
||
| @Override | ||
| public boolean delete(T item) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return deleted element,and make arguments final pls
| T data = head.data; | ||
| head = head.next; | ||
| size--; | ||
| if (head == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use size for checking this condition instead of nodes
| @Override | ||
| public void addTail(T item) { | ||
| Node<T> newNode = new Node<>(item); | ||
| if (tail == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use size for checking this condition instead of node
| @Override | ||
| public T addHead(T item) { | ||
| Node<T> newNode = new Node<>(item); | ||
| if (head == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use size for checking this condition instead of node
|
|
||
| @Override | ||
| public T removeTail() { | ||
| if (tail == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use size for checking this condition instead of node
| if (tail == null) { | ||
| return null; | ||
| } | ||
| if (head == tail) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use size for checking this condition instead of node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls look
I build Patient Management system with controller, service, dto, dao structure
2ed3a1b to
5da5a51
Compare
5c9d9a9 to
e88ec73
Compare
No description provided.