FIND YOUR NEXT FEW LINES

Results for “Maps & sets”

Small, practical examples. Search by task or narrow things down below.

58 snippets foundClear filters
RustMaps & sets

Iterate over keys in sorted order

Iterate over keys in sorted order in a complete Rust program using the standard library.

Rust✓ Tested
RustMaps & sets

Query an ordered map’s key range

Query an ordered map’s key range in a complete Rust program using the standard library.

Rust✓ Tested
RustMaps & sets

Remove an entry and inspect its value

Remove an entry and inspect its value in a complete Rust program using the standard library.

Rust✓ Tested
GoMaps & sets

Represent a set with empty structs

Represent a set with empty structs using a complete Go program with explicit sample inputs.

Go✓ Tested
GoMaps & sets

Sort map keys for stable output

Sort map keys for stable output using a complete Go program with explicit sample inputs.

Go✓ Tested
RustMaps & sets

Update an existing map value

Update an existing map value in a complete Rust program using the standard library.

Rust✓ Tested
JavaScriptObject behavior & collections

Find shared members of two sets

JavaScript: Filter one set through the other set’s membership test.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Find shared members of two sets

TypeScript: Filter one set through the other set’s membership test.

TypeScript✓ Tested
C++Ordering & set operations

Find the common members of two sorted sets

C++: set_intersection requires both input ranges to be sorted under the same comparator.

C++✓ Tested
SQLRelationships & missing data

Generate every combination of two sets

SQL: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.

SQL✓ Tested
SQL ServerRelationships & missing data

Generate every combination of two sets

SQL Server: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.

SQL Server✓ Tested
PostgresRelationships & missing data

Generate every combination of two sets

Postgres: CROSS JOIN creates one result per possible pair, so the output size is the product of the input sizes.

Postgres✓ Tested