We could have bubble sort with a val % 2 ==0 predicate or a slighty modified version of a Dutch national flag sorting problem, the main idea is to have two pointers. IMO in that case the space complexity should be O(1)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
We could have bubble sort with a
val % 2 ==0
predicate or a slighty modified version of a Dutch national flag sorting problem, the main idea is to have two pointers. IMO in that case the space complexity should be O(1)