MCPcopy Create free account
hub / github.com/loiane/javascript-datastructures-algorithms / isEmpty

Method isEmpty

src/07-set/set.ts:91–93  ·  view source on GitHub ↗

* Returns true if the set has no elements. * @returns Whether the set is empty * @complexity Time O(1) | Space O(1)

()

Source from the content-addressed store, hash-verified

89 * @complexity Time O(1) | Space O(1)
90 */
91 isEmpty(): boolean {
92 return this.#size === 0;
93 }
94
95 /**
96 * Removes all elements from the set.

Callers 3

removeMethod · 0.45
matchCandidateWithJobsFunction · 0.45
set.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected