Skip to content

Conversation

@Turqut7
Copy link
Owner

@Turqut7 Turqut7 commented Oct 3, 2024

No description provided.

@Turqut7 Turqut7 requested a review from sabuhihuseynov October 3, 2024 12:21
Copy link
Collaborator

@sabuhihuseynov sabuhihuseynov left a comment

Choose a reason for hiding this comment

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

pls look

}

@Override
public void insert(int index, T item) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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

Copy link
Collaborator

@sabuhihuseynov sabuhihuseynov left a 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
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.

2 participants