示例#1
0
        public void MinIndex_WhenMultipleKeysAreInQueue_WillReturnIndexOfMinimumKey()
        {
            IndexMinPriorityQueue <double> queue = new IndexMinPriorityQueue <double>(10);

            queue.Insert(4, 12.5);
            queue.Insert(3, 40.12);
            queue.Insert(7, 4.3);
            queue.Insert(2, 162.75);

            int minIndex = queue.MinIndex();

            Assert.AreEqual(7, minIndex);
        }