Next time it restarts, look in the battery stats. Tap the graph at the top to get to the next screen. Do you see a sudden drop to 0 or almost 0? That would be a bad battery. (It can happen with a brand new one, or the battery can last for years. It's a known problem with the technology, and the industry is working on it. See Lithium Battery Dendrite links for more than you ever wanted to know about the problem.)
i got the same issue when i check the battery usage i notice it has a sudden drop.
so does it means i need to replace my battery cause i already did factory reset and its still restarting