As can be seen from the figure, odd rows are arranged from left to right, and even rows are arranged from right to left. 1000 is the 999th number, and 999/4=249.75, so 1000 is in line 250th.
249*4=996, and the last number in line 249 is 996- 1=997.
So the last two lines are arranged in this order:
994 995 996 997
1000 999 998