Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenhuaizeng committed Mar 20, 2023
1 parent e82d5c6 commit 7a14443
Show file tree
Hide file tree
Showing 6 changed files with 357 additions and 53 deletions.
124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 1 addition & 12 deletions src/FlightRoutesGraph.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import edu.greenriver.sdev333.MathSet;
import edu.greenriver.sdev333.BSTSet;
import edu.greenriver.sdev333.*;

import java.util.HashSet;


public class FlightRoutesGraph
Expand All @@ -24,9 +23,6 @@ public Edge(String from, String to)

}




private MathSet<String> nodes;

private MathSet<Edge> edges;
Expand Down Expand Up @@ -72,13 +68,6 @@ else if(e.node2.equals(city))
return neighbors;
}








public static void main(String[] args)
{
FlightRoutesGraph g = new FlightRoutesGraph();
Expand Down
28 changes: 28 additions & 0 deletions src/Main.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
import edu.greenriver.sdev333.*;


public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
//write some code to test out your methods for your set
//Create 2 sets
// add items to each of the sets (some same, some different)

//Test
// set intersection
// set union
// set difference

MathSet<String> set1 = new BSTSet<>();
set1.add("Ken");
set1.add("Tina");

MathSet<String> set2 = new BSTSet<>();

// union set 1 and set 2, save into result 1
MathSet<String> result1 = set1.union(set2);

//print out keys from result1
for(String key: result1.keys())
{
System.out.println(key);
}


}
}
2 changes: 1 addition & 1 deletion src/edu/greenriver/sdev333/BSTSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public Node(KeyType key, int N)
@Override
public void add(KeyType key)
{
//TODO
//BST
}

/**
Expand Down
Loading

0 comments on commit 7a14443

Please sign in to comment.