Use Pseudocode To Clarify Your Thoughts
Unless an algorithm is extremely simple, you'll want to write pseudocode first.
This is especially true for brute-force solutions. The interviewer may be okay with just the pseudocode for the first pass, and could ask you to spend the remaining time solving and coding an optimized solution.
Additionally, thinking in pseudocode is much easier to modify should you find a deleterious error. Here's what it might first look like:
xxxxxxxxxx
temp = []
zero_count = 0
iterate through array:
if nonzero, push to new temp
if zero, increment count
for zero_count times:
push to temp
return temp
OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment