class Solution(object):
    def sortArrayByParity(self, A):
        return [x for x in A if x % 2 == 0] + [x for x in A if x % 2 == 1]

 

相关文章:

  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2021-06-19
  • 2021-08-19
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-09
  • 2021-08-06
  • 2021-07-22
  • 2021-07-04
  • 2021-11-17
  • 2021-05-10
  • 2021-08-31
相关资源
相似解决方案