Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made _Node and main method #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ It should feel quite similar to code you would have seen in your first-year CS c
In a small group (around 4 students), choose one of you to make a fork of
https://github.com/CSC207-2023F-UofT/multiset-adt

- [ ] Each other team member should make a fork of that repo (or the repository owner can add the others
- [X] Each other team member should make a fork of that repo (or the repository owner can add the others
as collaborators).

- [ ] Take the time to skim the rest of the instructions to get a better sense of what you'll be doing
- [X] Take the time to skim the rest of the instructions to get a better sense of what you'll be doing
in this activity. If you have any immediate questions, raise these with your group or ask your TA.

- [ ] As a team, explore the python code base and identify specific pieces of code that will need to
- [X] As a team, explore the python code base and identify specific pieces of code that will need to
be completed. (See the general strategies and advice further below, ask other groups, or
ask your TA for advice as needed.)
- The next section highlights a few aspects of the code which your team should think about as you
Expand Down
4 changes: 4 additions & 0 deletions src/Tree.java
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
// matthew test

public class Tree {
}


10 changes: 10 additions & 0 deletions src/_Node.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class _Node {
Object item;
_Node next;

public _Node(Object item){
this.item = item;
this.next = null;
}

}
28 changes: 28 additions & 0 deletions src/main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import java.util.ArrayList;
import java.util.Random;
public class main {
public static void main(String[] args) {


}

public void profileMultiSet(MultiSet my_input, int n){
ArrayList<Integer> items_added = new ArrayList<Integer>();
Random rand = new Random();
for (int i = 0; i<n; i++){
int x = rand.nextInt(101);
my_input.add(x);
items_added.add(x);
}
assert my_input.size == n;
long start = System.currentTimeMillis();
for (int x: items_added){
items_added.remove(x);
}
long end = System.currentTimeMillis();

assert items_added.isEmpty();
System.out.println("too lazy for now, will fix later" + "time: " + (start - end));

}
}