diff --git a/notes/面试总结.md b/notes/面试总结.md index 867fb55c..9b841f92 100644 --- a/notes/面试总结.md +++ b/notes/面试总结.md @@ -1681,6 +1681,16 @@ class Solution: return copyArray ``` +```python +# -*- coding:utf-8 -*- +class Solution: + def reOrderArray(self, array): + # write code here + odd = [x for x in array if x%2] + even = [x for x in array if not (x%2)] + result = odd + even + return result +``` # 参考文献