You are viewing a single comment's thread from:
RE: Coding Challenge #2 – Polynomial
A few tips: Only the first + can be omitted, so after that a + or - is a delimiter. if no x is present, use x^0 and if x is present, use x^1.
so I would first split by +I- and then work on each number. If you want to allow x^{-1} then ignore +I- inside {}. Each number can be split at the x and the left part is the number, the right part (if exist) the x^y.
I'll be keeping this challenge on for a bit so you have time to complete it :)
Thanks for the hints! I actually got the input parsing solved already, clean output is almost done but I'm moving on to the problem of adding now. Making progress :)