static void Main(string[] args) { NumberCollection collection = new NumberCollection(); collection.add(1); collection.sort(); collection.add(2); collection.sort(); collection.add(3); collection.sort(); collection.add(4); collection.sort(); collection.add(5); collection.sort(); collection.remove(5); collection.sort(); collection.remove(4); collection.sort(); collection.remove(2); collection.sort(); }
static void Main(string[] args) { NumberCollection numberCollection = new NumberCollection(); for (int i = 0; i < 1000; i++) { numberCollection.add(1); numberCollection.add(3); numberCollection.add(2); } numberCollection.sort(); for (int i = 0; i < 1000; i++) { numberCollection.remove(1); numberCollection.remove(3); numberCollection.remove(2); } numberCollection.sort(); }