Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS682-HW1-OrderMatching
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rohit Prasad
CS682-HW1-OrderMatching
Commits
6fbbc447
Commit
6fbbc447
authored
Jan 20, 2018
by
Rohit Prasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use LinkedList instead of ArrayList
parent
eee8b750
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/OrderMatching.java
src/OrderMatching.java
+3
-2
No files found.
src/OrderMatching.java
View file @
6fbbc447
...
...
@@ -2,8 +2,8 @@ import java.util.*;
public
class
OrderMatching
{
ArrayList
<
SellOrder
>
sellOrderQueue
=
new
Array
List
<>();
ArrayList
<
BuyOrder
>
buyOrderQueue
=
new
Array
List
<>();
List
<
SellOrder
>
sellOrderQueue
=
new
Linked
List
<>();
List
<
BuyOrder
>
buyOrderQueue
=
new
Linked
List
<>();
/*
* Checks if the order is valid
...
...
@@ -11,4 +11,5 @@ public class OrderMatching {
boolean
validate
(
Order
order
)
{
return
order
.
getQty
()
>
0
&&
order
.
getPrice
()
>
0.0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment