FIND YOUR NEXT FEW LINES

Results for “Small algorithms & bit operations”

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

443 snippets foundClear filters
SQLBulk changes & set operations

Remove duplicate values while keeping the smallest key

SQL: Identify retained keys in a grouped subquery before deleting other copies.

SQL✓ Tested
SQL ServerBulk changes & set operations

Remove duplicate values while keeping the smallest key

SQL Server: Identify retained keys in a grouped subquery before deleting other copies.

SQL Server✓ Tested
PostgresBulk changes & set operations

Remove duplicate values while keeping the smallest key

Postgres: Identify retained keys in a grouped subquery before deleting other copies.

Postgres✓ Tested
SQLiteBulk changes & set operations

Remove duplicate values while keeping the smallest key

SQLite: Identify retained keys in a grouped subquery before deleting other copies.

SQLite✓ Tested
JavaQueues & collection operations

Retrieve the smallest queued value first

Java: PriorityQueue poll removes the smallest value under the natural ordering.

Java✓ Tested
C++Ordering & set operations

Sort only the smallest requested prefix

C++: partial_sort orders the selected prefix without guaranteeing the order of the remainder.

C++✓ Tested
ReactCustom hooks

Encapsulate increment and reset operations

Encapsulate increment and reset operations with a small React component and explicit browser behavior.

React✓ Tested
ReactCustom hooks

Expose immutable collection operations

Expose immutable collection operations with a small React component and explicit browser behavior.

React✓ Tested
CFile positioning & lifecycle

Measure a small seekable binary file

C: Seek to the end and inspect ftell, checking both operations for errors.

C✓ Tested
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested
Bash ScriptsText parsing & arithmetic

Set and clear a bit in a shell integer

Bash Scripts: Use shifts and bitwise operators for a small flag field.

Bash Scripts✓ Tested
C++Containers & compound values

Store and inspect a fixed set of bits

C++: bitset offers named operations and a readable binary representation.

C++✓ Tested