CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 06:56:32 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=16719dee1bab114f5cbff283ca7ab98925e24e2fbe8b47b08498d8c00cc385b0a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22M_bFvMxXG0-EqdV_UO8Hmu_Ygt7-moVX%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d4b2ac0984c1c2-BLR
export class Multiset<T> { private map: Map<T, Number> = new Map(); - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class Multiset<T> {
- private map: Map<T, Number> = new Map();
- constructor(items: Array<T> = []) {
- items.forEach((item: T) => this.add(item));
- }
- add(key: T, count: number = 1) : number {
- var val = (this.get(key) || 0) + count;
- this.map.set(key, val);
- return val;
- }
- get(key: T): number | undefined {
- if (this.map.has(key)) {
- return this.map.get(key)!.valueOf();
- }
- return undefined;
- }
- entries(): Array<[T, number]> {
- var results: Array<[T, number]> = [];
- this.map.forEach((count: Number, key: T) => {
- results.push([key, count.valueOf()]);
- });
- return results;
- }
- toString(): string {
- return this.map.toString();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
✅⭐ Make huge profits on trading ⭐⭐ E
JavaScript | 16 sec ago | 0.25 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 25 sec ago | 0.25 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ Y
JavaScript | 34 sec ago | 0.25 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ A
JavaScript | 43 sec ago | 0.25 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ L
JavaScript | 54 sec ago | 0.25 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ H
JavaScript | 1 min ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ 5
JavaScript | 1 min ago | 0.25 KB
-
✅⭐ Make huge profits on trading ⭐⭐ E
JavaScript | 1 min ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand