Skip to content

Instantly share code, notes, and snippets.

@eHammarstrom
Created September 21, 2017 13:29
Show Gist options
  • Save eHammarstrom/2a47ca9a86e3ff4cb8ffa32fd4aacda6 to your computer and use it in GitHub Desktop.
Save eHammarstrom/2a47ca9a86e3ff4cb8ffa32fd4aacda6 to your computer and use it in GitHub Desktop.
[ 3x^3
, 2x^2,
, -21x^2
, -14x
, 3x
, 2 ]
for (int i = 0; i < list_len; i++) {
for (int j = i; j < list_len; j++) {
if i.grad == j.grad
result add addition of poly parts i j
match = true;
}
if (!match)
result add poly part
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment