Learn to remove elements matching a target value from an array using in-place operations and minimal extra space.