Use two pointers to search the target val.
One pointer 'j' is the slow one, only go forward by 1 if the other fast pointer's 'i''s value is not the target val. In this case, it will be replaced by the fast pointer's 'i' value. 'i' search entire array. If 'i' point to the target value, it does nothing, just go to the next one.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)