Given an array of positive and negative integers, re-arrange it so that you have positive integers on one end and negative integers on other

后端 未结 30 2553
醉梦人生
醉梦人生 2020-12-07 07:37

I recently came across a Microsoft Interview Question for Software Engineer.

Given an array of positive and negative integers, re-arrange it so that you

30条回答
  •  日久生厌
    2020-12-07 08:39

    Look at Heapsort in the table of sorting algorithms on Wikipedia: http://en.wikipedia.org/wiki/Sorting_algorithm

提交回复
热议问题