Know your C++ Algorithms! This is std::partition :)
https://en.cppreference.com/w/cpp/algorithm/partition\n    \n\nvector<int> sortArrayByParity(vector<int>& A) {\n    auto is_even = [] (auto e) { return e % 2 ==
https://en.cppreference.com/w/cpp/algorithm/partition\n    \n```\nvector<int> sortArrayByParity(vector<int>& A) {\n    auto is_even = [] (auto e) { return e % 2 == 0; };\n    partition (A.begin (), A.end (), is_even);\n    return A;\n}\n```\nCheck out the video solution here: https://youtu.be/FgzZ4ShshPs?t=1m25s\n
[]