От: | nt2000 | ||
Дата: | 07.09.19 20:28 | ||
Оценка: |
Емкость можно уменьшить, вызвав TrimExcess.
Этот конструктор является операцией O (1).
If Count is less than the capacity of the stack, Push is an O(1) operation. If the capacity needs to be increased to accommodate the new element, Push becomes an O(n) operation, where n is Count. Pop is an O(1) operation.
Этот метод является операцией On(), где n имеет Count.