Less than 1 minute
Home > @hz-9/algorithm > Base
Base class
Base class for algorithm.
基类。
Signature:
export declare abstract class Base<T>Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| boolean | Whether the algorithm class is empty. 算法类是否为空? | |
| number | The number of elements in the algorithm class. 算法类内元素数量。 |
Methods
Method | Modifiers | Description |
|---|---|---|
| Clear all elements in the algorithm class. 清空算法类内所有元素。 Time Complexity: O(1) Space Complexity: O(1) | |
| Returns an array representation of the algorithm class. 返回由算法类信息组成的数组。 Time Complexity: O(n) Space Complexity: O(n) | |
| Returns a string representation of the algorithm class. 返回由算法类信息组成的字符串。 Time Complexity: O(n) Space Complexity: O(n) |