First attempt to partition algorithm
Added postorder and added test case