Today i solved 2149 Rearrange Array Elements by Sign in leetcode and here's my learnings
The initial approach is to use 2 arrays to store positive and negative numbers and then rearrange later.
This takes the time and space complexity of O(2N) and O(N).