美文网首页
75. Sort Colors

75. Sort Colors

作者: 高思阳 | 来源:发表于2018-10-18 13:42 被阅读0次

Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the integers 0, 1, and 2 to represent the color red, white, and blue respectively.
译: 给定一个大小为n的数组,其中包含的元素对象为红、白、蓝,将其进行毗连的排序,顺序为红、白、蓝。在此我们用0,1,2来代表红白蓝三个颜色。

相关文章

网友评论

      本文标题:75. Sort Colors

      本文链接:https://www.haomeiwen.com/subject/fenjzftx.html