Write a function to partition a list of integers such that all even numbers appear before odd numbers
HardProblem Statement
Write a function to partition a list of integers such that all even numbers appear before odd numbers
Sample Input
[3, 1, 2, 4]
Sample Output
[4, 2, 1, 3]
Limits
Time: 2s · Memory: 256 MB