Skip to content

Commit 5edf94a

Browse files
committed
test
1 parent 00c7584 commit 5edf94a

File tree

11 files changed

+241
-0
lines changed

11 files changed

+241
-0
lines changed

group03/2864885311/DS/.classpath

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
7+
<classpathentry kind="output" path="bin"/>
8+
</classpath>

group03/2864885311/DS/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin/

group03/2864885311/DS/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>2017Learning</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.8
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.8
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
package com.coding.basic;
2+
//import java.util.Iterator;
3+
4+
//import java.util.List;
5+
6+
public class ArrayList implements List {
7+
8+
private int size = 0;
9+
10+
private Object[] elementData = new Object[100];
11+
12+
public void add(Object o){
13+
//int int_inarry = 10;
14+
grow(o);
15+
16+
}
17+
public void add(int index, Object o){
18+
19+
20+
21+
22+
}
23+
24+
public Object get(int index){
25+
return null;
26+
}
27+
28+
public Object remove(int index){
29+
return null;
30+
}
31+
32+
public int size(){
33+
return -1;
34+
}
35+
36+
public Iterator iterator(){
37+
return null;
38+
}
39+
40+
private void grow(Object nbradd){
41+
42+
if (this.size>this.elementData.length){
43+
Object[] arrayRefVar = new Object[this.elementData.length+1];
44+
growcopy(nbradd,arrayRefVar);
45+
}else{
46+
Object[] arrayRefVar = new Object[this.elementData.length];
47+
growcopy(nbradd,arrayRefVar);
48+
}
49+
}
50+
private void growcopy(Object nbraddcopy,Object[] arrayRefVarcopy){
51+
System.arraycopy(this.elementData, 0, arrayRefVarcopy, 0, this.elementData.length);
52+
this.elementData[0]=nbraddcopy;
53+
System.arraycopy(arrayRefVarcopy, 0, this.elementData, 1, this.size+1);
54+
this.size++;
55+
}
56+
private void instrgrow(int nbrindex,Object[] arraynbo,Object ino){
57+
58+
//Object[] arrayRefVar2 = new Object[nbrindex];
59+
Object[] arrayRefVar3 = new Object[this.size-nbrindex];
60+
61+
62+
System.arraycopy(this.elementData, nbrindex, arrayRefVar3, nbrindex, this.size);
63+
this.elementData[nbrindex]=ino;
64+
System.arraycopy(arrayRefVar3, 0, this.elementData, nbrindex+1, this.size);
65+
66+
67+
}
68+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.coding.basic;
2+
3+
public class BinaryTreeNode {
4+
5+
private Object data;
6+
private BinaryTreeNode left;
7+
private BinaryTreeNode right;
8+
9+
public Object getData() {
10+
return data;
11+
}
12+
public void setData(Object data) {
13+
this.data = data;
14+
}
15+
public BinaryTreeNode getLeft() {
16+
return left;
17+
}
18+
public void setLeft(BinaryTreeNode left) {
19+
this.left = left;
20+
}
21+
public BinaryTreeNode getRight() {
22+
return right;
23+
}
24+
public void setRight(BinaryTreeNode right) {
25+
this.right = right;
26+
}
27+
28+
public BinaryTreeNode insert(Object o){
29+
return null;
30+
}
31+
32+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.coding.basic;
2+
3+
public interface Iterator {
4+
public boolean hasNext();
5+
public Object next();
6+
7+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.coding.basic;
2+
3+
public class LinkedList implements List {
4+
5+
private Node head;
6+
7+
public void add(Object o){
8+
9+
}
10+
public void add(int index , Object o){
11+
12+
}
13+
public Object get(int index){
14+
return null;
15+
}
16+
public Object remove(int index){
17+
return null;
18+
}
19+
20+
public int size(){
21+
return -1;
22+
}
23+
24+
public void addFirst(Object o){
25+
26+
}
27+
public void addLast(Object o){
28+
29+
}
30+
public Object removeFirst(){
31+
return null;
32+
}
33+
public Object removeLast(){
34+
return null;
35+
}
36+
public Iterator iterator(){
37+
return null;
38+
}
39+
40+
41+
private static class Node{
42+
Object data;
43+
Node next;
44+
45+
}
46+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.coding.basic;
2+
3+
public interface List {
4+
5+
public void add(Object o);
6+
public void add(int index, Object o);
7+
public Object get(int index);
8+
public Object remove(int index);
9+
public int size();
10+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.coding.basic;
2+
3+
public class Queue {
4+
5+
public void enQueue(Object o){
6+
}
7+
8+
public Object deQueue(){
9+
return null;
10+
}
11+
12+
public boolean isEmpty(){
13+
return false;
14+
}
15+
16+
public int size(){
17+
return -1;
18+
}
19+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.coding.basic;
2+
3+
public class Stack {
4+
private ArrayList elementData = new ArrayList();
5+
6+
public void push(Object o){
7+
}
8+
9+
public Object pop(){
10+
return null;
11+
}
12+
13+
public Object peek(){
14+
return null;
15+
}
16+
public boolean isEmpty(){
17+
return false;
18+
}
19+
public int size(){
20+
return -1;
21+
}
22+
}

0 commit comments

Comments
 (0)