Results for “Queues & collection operations”
Small, practical examples. Search by task or narrow things down below.
Reverse slice order
Reverse slice order using a complete Go program with explicit sample inputs.
Go✓ Tested
Search a sorted array efficiently
C#: Array.BinarySearch requires an array sorted with the same comparison rules.
C#✓ Tested
Select a range of array elements
Bash Scripts: Quote a sliced at-sign expansion to keep each selected element separate.
Bash Scripts✓ Tested
Select elements by an index range
PowerShell: An index range selects the requested array positions in order.
PowerShell✓ Tested
Sequence work on an element’s queue
jQuery: A queue callback calls next to allow the following callback to run.
jQuery✓ Tested
Set owner-only read and write permissions
C++: Replace ordinary permission bits with the requested owner permissions.
C++✓ Tested
Set several inline styles together
jQuery: Pass a property-value object to css.
jQuery✓ Tested
Sort integers in place
Sort integers in place using a complete Go program with explicit sample inputs.
Go✓ 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
Sort timestamp strings by their parsed instants
JavaScript: Compare epoch values explicitly when date strings may contain different offsets.
JavaScript✓ Tested
Sort timestamp strings by their parsed instants
TypeScript: Compare epoch values explicitly when date strings may contain different offsets.
TypeScript✓ Tested