Skip to content

Commit 3866708

Browse files
committed
first commit
0 parents  commit 3866708

File tree

78 files changed

+1320
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1320
-0
lines changed

.metadata/.lock

Whitespace-only changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package class1;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class StackAndQueue {
7+
8+
static List<Integer> list=new ArrayList<Integer>();
9+
10+
public static void main(String[] args) {
11+
List<Integer> list=Inital();
12+
boolean b=stackEmpty(list);
13+
System.out.println(b);
14+
}
15+
public StackAndQueue(List< Integer> list){
16+
this.list=list;
17+
18+
}
19+
public static List<Integer> Inital(){
20+
// list.add(3);
21+
// list.add(5);
22+
// list.add(9);
23+
return list;
24+
}
25+
public static boolean stackEmpty(List< Integer> list){
26+
List list1=new ArrayList<>();
27+
System.out.println(list);
28+
System.out.println(list.hashCode());
29+
System.out.println(list1.hashCode());
30+
if (list==null)
31+
return true;
32+
else
33+
return false;
34+
}
35+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package class1;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class StackAndQueue {
7+
8+
static List<Integer> list=new ArrayList<Integer>();
9+
10+
public static void main(String[] args) {
11+
List<Integer> list=Inital();
12+
boolean b=stackEmpty(list);
13+
System.out.println(b);
14+
list=Push(list,9);
15+
System.out.println(list);
16+
list=remove(list,9);
17+
System.out.println(list);
18+
}
19+
public StackAndQueue(List< Integer> list){
20+
this.list=list;
21+
22+
}
23+
public static List<Integer> Inital(){
24+
list.add(3);
25+
list.add(5);
26+
list.add(9);
27+
return list;
28+
}
29+
public static List Push(List list,int a){
30+
list.add(a);
31+
return list;
32+
}
33+
public static List remove(List list,int a){
34+
list.remove(list.size());
35+
return list;
36+
}
37+
public static boolean stackEmpty(List< Integer> list){
38+
List list1=new ArrayList<>();
39+
System.out.println(list);
40+
System.out.println(list.hashCode());
41+
System.out.println(list1.hashCode());
42+
if (list==null)
43+
return true;
44+
else
45+
return false;
46+
}
47+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package class1;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class StackAndQueue {
7+
8+
static List<Integer> list=new ArrayList<Integer>();
9+
10+
public static void main(String[] args) {
11+
List<Integer> list=Inital();
12+
boolean b=stackEmpty(list);
13+
System.out.println(b);
14+
}
15+
public StackAndQueue(List< Integer> list){
16+
this.list=list;
17+
18+
}
19+
public static List<Integer> Inital(){
20+
list.add(3);
21+
list.add(5);
22+
list.add(9);
23+
return list;
24+
}
25+
public static boolean stackEmpty(List< Integer> list){
26+
List list1=new ArrayList<>();
27+
System.out.println(list);
28+
System.out.println(list.hashCode());
29+
System.out.println(list1.hashCode());
30+
if (list==null)
31+
return true;
32+
else
33+
return false;
34+
}
35+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package class1;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class StackAndQueue {
7+
8+
static List<Integer> list=new ArrayList<Integer>();
9+
10+
public static void main(String[] args) {
11+
List<Integer> list=Inital();
12+
boolean b=stackEmpty(list);
13+
System.out.println(b);
14+
list=Push(list,9);
15+
System.out.println(list);
16+
}
17+
public StackAndQueue(List< Integer> list){
18+
this.list=list;
19+
20+
}
21+
public static List<Integer> Inital(){
22+
list.add(3);
23+
list.add(5);
24+
list.add(9);
25+
return list;
26+
}
27+
public static List Push(List list,int a){
28+
list.add(a);
29+
return list;
30+
}
31+
public static List remove(List list,int a){
32+
list.remove(a);
33+
return list;
34+
}
35+
public static boolean stackEmpty(List< Integer> list){
36+
List list1=new ArrayList<>();
37+
System.out.println(list);
38+
System.out.println(list.hashCode());
39+
System.out.println(list1.hashCode());
40+
if (list==null)
41+
return true;
42+
else
43+
return false;
44+
}
45+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package class1;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class StackAndQueue {
7+
8+
static List<Integer> list=new ArrayList<Integer>();
9+
10+
public static void main(String[] args) {
11+
List<Integer> list=Inital();
12+
boolean b=stackEmpty(list);
13+
System.out.println(b);
14+
}
15+
public StackAndQueue(List< Integer> list){
16+
this.list=list;
17+
18+
}
19+
public static List<Integer> Inital(){
20+
// list.add(3);
21+
// list.add(5);
22+
// list.add(9);
23+
return list;
24+
}
25+
public static boolean stackEmpty(List< Integer> list){
26+
System.out.println(list);
27+
System.out.println(list.hashCode());
28+
System.out.println(list.hashCode());
29+
if (list==null)
30+
return true;
31+
else
32+
return false;
33+
}
34+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package class1;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class StackAndQueue {
7+
8+
static List<Integer> list=new ArrayList<Integer>();
9+
10+
public static void main(String[] args) {
11+
List<Integer> list=Inital();
12+
boolean b=stackEmpty(list);
13+
System.out.println(b);
14+
}
15+
public StackAndQueue(List< Integer> list){
16+
this.list=list;
17+
18+
}
19+
public static List<Integer> Inital(){
20+
// list.add(3);
21+
// list.add(5);
22+
// list.add(9);
23+
return list;
24+
}
25+
public static boolean stackEmpty(List< Integer> list){
26+
if (list==null)
27+
return true;
28+
else
29+
return false;
30+
}
31+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package class1;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class StackAndQueue {
7+
8+
static List<Integer> list=new ArrayList<Integer>();
9+
10+
public static void main(String[] args) {
11+
List<Integer> list=Inital();
12+
boolean b=stackEmpty(list);
13+
System.out.println(b);
14+
}
15+
public StackAndQueue(List< Integer> list){
16+
this.list=list;
17+
18+
}
19+
public static List<Integer> Inital(){
20+
list.add(3);
21+
// list.add(5);
22+
// list.add(9);
23+
return list;
24+
}
25+
public static boolean stackEmpty(List< Integer> list){
26+
List list1=new ArrayList<>();
27+
System.out.println(list);
28+
System.out.println(list.hashCode());
29+
System.out.println(list1.hashCode());
30+
if (list==null)
31+
return true;
32+
else
33+
return false;
34+
}
35+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4+
org.eclipse.jdt.core.compiler.compliance=1.7
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7+
org.eclipse.jdt.core.compiler.source=1.7
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package class1;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class StackAndQueue {
7+
8+
static List<Integer> list=new ArrayList<Integer>();
9+
10+
public static void main(String[] args) {
11+
List<Integer> list=Inital();
12+
boolean b=stackEmpty(list);
13+
System.out.println(b);
14+
}
15+
public StackAndQueue(List< Integer> list){
16+
this.list=list;
17+
18+
}
19+
public static List<Integer> Inital(){
20+
// list.add(3);
21+
// list.add(5);
22+
// list.add(9);
23+
return list;
24+
}
25+
public static boolean stackEmpty(List< Integer> list){
26+
if (list.get(0)==null)
27+
return true;
28+
else
29+
return false;
30+
}
31+
}

0 commit comments

Comments
 (0)