title: Separate the alphabet and digit such that their relative order remains the same in O(n) time and O(1) space
body: <p>Given an array <code>[a1b7c3d2]</code> convert to <code>[abcd1732]</code> with <code>O(1)</code> space and <code>O(n)</code> time i.e. put the letters on the left and digits on the right such that their relative order is the same. I can think of an <code>O(nlogn)</code> algorithm, but not better. Can somebody please help?</p>