Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
That's stylish!
I like that imperative-style coding)
Test Passed
Test Passed
'5ab-c' should equal '-c+5ab'
Test monomial length ordering
'-abc+3a+2ac' should equal '3a+2ac-abc'
'xyz-xz' should equal '-xz+xyz'
Test lexicographic ordering
'a+ac-ab' should equal 'a-ab+ac'
'xyz+byz' should equal 'byz+xyz'
Test no leading +
'-y+x' should equal 'x-y'
'y-x' should equal '-x+y'
As for me I solved it.
UPD
But Anyways I've come up with it. Just added sorting in some places)))