You can use an algebraic method to determine oxidation numbers in a compound. I was taught this idea by Dr. Derek Davenport from Purdue University and it helped me a lot.