public void swim(int k) {
        /**
         * Checking for isLesser makes sure that the >= property of MaxHeap is
         * satisfied.
         */
        while (k > 1 && isLesser(k / 2, k)) {
            swapArrayValues(k / 2, k);
            k = k / 2;
            this.arrayAccess += 2;
            this.comparisions++;
        }
    }