Results for “Bulk changes & set operations”
Small, practical examples. Search by task or narrow things down below.
Count occurrences in a sorted sequence
C++: equal_range finds the half-open interval containing values equal to the key.
C++✓ Tested
Find a median element without fully sorting
C++: nth_element partitions around the element that would occupy the chosen sorted position.
C++✓ Tested
Find the insertion position for a sorted value
C++: lower_bound returns the first position whose value is not less than the search key.
C++✓ Tested
Group matching values while preserving their order
C++: stable_partition keeps the relative order within both predicate groups.
C++✓ Tested
Preserve equal-key order while sorting records
C++: stable_sort retains encounter order for records whose selected sort keys compare equal.
C++✓ Tested
Sort only the smallest requested prefix
C++: partial_sort orders the selected prefix without guaranteeing the order of the remainder.
C++✓ Tested
Sort records by two fields
C++: Tuple comparison implements lexicographic ordering across several keys.
C++✓ Tested
Combine a branch’s changes into one new commit
Git: Squash prepares the combined changes in the index without recording a merge parent.
Git✓ Tested
Convert a timestamp to a different fixed offset
C#: ToOffset changes the displayed local time while retaining the same instant.
C#✓ Tested
Create a first practice commit from staged changes
Git: Create a first practice commit from staged changes inside the disposable repository created by the input setup.
Git✓ Tested
Distinguish staged changes from working edits
Git: Distinguish staged changes from working edits inside the disposable repository created by the input setup.
Git✓ Tested
Inspect changes to a container’s writable layer
Docker / Compose: diff marks added, changed, and deleted filesystem paths.
Docker / Compose✓ Tested