Results for “Small algorithms & bit operations”
Small, practical examples. Search by task or narrow things down below.
Update state shared through context
Update state shared through context with a small React component and explicit browser behavior.
React✓ Tested
Use a context’s fallback value
Use a context’s fallback value with a small React component and explicit browser behavior.
React✓ Tested
Use a counted Bash loop
Bash Scripts: Use a counted Bash loop with a small standalone Bash program.
Bash Scripts✓ Tested
Use a fallback for an unset variable
Bash Scripts: Use a fallback for an unset variable with a small standalone Bash program.
Bash Scripts✓ Tested
Use a last-in first-out stack
C#: Stack is useful for reversible traversal and other nested operations.
C#✓ Tested
Use a switch expression to classify a value
C#: Relational patterns express a small ordered range classification.
C#✓ Tested
Use native required-field validation
Use native required-field validation with a small React component and explicit browser behavior.
React✓ Tested
Use React 19’s provider shorthand
Use React 19’s provider shorthand with a small React component and explicit browser behavior.
React✓ Tested
Validate access through a custom context hook
Validate access through a custom context hook with a small React component and explicit browser behavior.
React✓ Tested
Write and run a first Bash script
Bash Scripts: Write and run a first Bash script with a small standalone Bash program.
Bash Scripts✓ Tested
Write several literal lines
Bash Scripts: Write several literal lines with a small standalone Bash program.
Bash Scripts✓ Tested