Cubic interview question

array sorting without using predefined method's.