Using Eller's algorithm