The table above shows selected values for a polynomial function g. Based on the values in the table, which of the following must be a factor of g(x)?
(x−1)
(x+1)
(x−1)2
(x+1)2