coda con priorita' creata. bisogna modificare la unsorted poiche' e' stata copiata dalla prima.
This commit is contained in:
@@ -3,7 +3,6 @@ package com.xgiovio;
|
||||
import general_utility.test_object;
|
||||
import position.Position;
|
||||
import sequence.ArraySequence;
|
||||
import sequence.ArraySequenceFake;
|
||||
|
||||
/**
|
||||
* Created with xgiovio.macbookair.
|
||||
|
||||
41
com/xgiovio/SortedListPriorityQueueTest.java
Normal file
41
com/xgiovio/SortedListPriorityQueueTest.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package com.xgiovio;
|
||||
|
||||
import priorityqueue.SortedListPriorityQueue;
|
||||
|
||||
import java.security.InvalidKeyException;
|
||||
|
||||
/**
|
||||
* Created with MONSTER.
|
||||
* User: xgiovio
|
||||
* Date: 02/04/2014
|
||||
* Time: 00:10
|
||||
*/
|
||||
public class SortedListPriorityQueueTest {
|
||||
|
||||
public static void main(String[] args) throws InvalidKeyException{
|
||||
|
||||
|
||||
SortedListPriorityQueue<Integer,String> a = new SortedListPriorityQueue<Integer, String>();
|
||||
a.insert(5,"hello");
|
||||
System.out.print(a.size());
|
||||
System.out.print(a);
|
||||
a.insert(11,"sdas");
|
||||
System.out.print(a.size());
|
||||
|
||||
a.insert(21,"sdas");
|
||||
a.insert(1,"sdas");
|
||||
a.insert(-10,"slkjldas");
|
||||
|
||||
System.out.print(a);
|
||||
System.out.print(a.size());
|
||||
a.insert(21,"sdas");
|
||||
a.insert(1,"sdas");
|
||||
a.insert(-10,"slkjldas");
|
||||
System.out.print(a);
|
||||
System.out.print(a.size());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user