diff --git a/group12/441908378/ArrayList.java b/group12/441908378/ArrayList.java new file mode 100755 index 0000000000..45e495867c --- /dev/null +++ b/group12/441908378/ArrayList.java @@ -0,0 +1,50 @@ +import java.util.Arrays; + +public class ArrayList { + +private int size = 0; + +private Object[] elementData = new Object[100]; + +public void enlargeCapacity(int minCapacity){ + int oldCapacity=elementData.length; + if(oldCapacityb){ + return left; + }else{ + return right; + } + } + + +} diff --git a/group12/441908378/LinkedList.java b/group12/441908378/LinkedList.java new file mode 100755 index 0000000000..0d0339bc01 --- /dev/null +++ b/group12/441908378/LinkedList.java @@ -0,0 +1,121 @@ +public class LinkedList { + +private Node head; + +private static class Node{ + Object data; + Node next; +} + +public boolean hasNext(Node a){ + if(a.next!=null){ + return true; + } + return false; +} + +public Node getIndex(int index){ + Node a=head.next; + for(int i=0;i