Suppose you have an array of N elements containing only two distinct keys, true and false. Explain (or code) an O(N) algorithm to rearrange the list so all false elements precede the true elements. You may use only constant extra space, which means that you cannot count the true or false elements.