linkedList done for real

This commit is contained in:
Libkyy
2022-03-21 18:30:19 +02:00
parent 9f2908cd46
commit 76e906587c
2 changed files with 9 additions and 0 deletions

7
.idea/discord.xml generated Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
</component>
</project>

View File

@@ -79,6 +79,7 @@ public class linkedlist
target.next = inserted; target.next = inserted;
inserted.prev = target; inserted.prev = target;
tail = inserted; tail = inserted;
size++;
} }
public void addFirst(int value) public void addFirst(int value)
@@ -89,6 +90,7 @@ public class linkedlist
target.prev = inserted; target.prev = inserted;
inserted.next = target; inserted.next = target;
head = inserted; head = inserted;
size++;
} }