DETROIT (AP) — Ziaire Williams made two 3-pointers in the final three minutes and the Brooklyn Nets ended a 10-game losing streak by rallying to beat the Detroit Pistons 107-105 on Saturday night.