Rearrange array by removing X and padding with 1s
Filed under Sigmoid
The question
Remove all occurrences of a number X from an array, shift the remaining elements to the right while preserving order, and fill the resulting empty spots on the left with the number 1.
No write-up yet. Related questions below have one.
Related Sigmoid questions
Collected from public candidate posts and coding forums. Updated Nov 2026.