explanation: which should be the central atom in the Lewis structure?

The atom that can make the most bonds should go in the middle.

Example: Carbon vs. Oxygen

We are looking for unpaired electrons. These are capable of making bonds.

C has 4 unpaired electrons, oxygen only 2.

            

For this reason C should go into the middle of the skeleton.

Notice that this typically coincides with an element being on the left side of a row in the periodic table.

C is on the left side of O, and has less valence electrons.

 

Some algorithms say that the atom that has the least electronegativity goes in the middle.

This works a lot of the times, but in some cases not. The following shows an example when this rule does not work.

Oxygen vs. chlorine

(δ is the symbol for electronegativity)

δ of oxygen = 3.44

δ of chlorine = 3.16

For example in the formula: HOCl, based on this electronegativity rule, Cl should go in the middle, but it is oxygen that does even though the Cl electronegativity is lower.

Although it should be said that under special conditions Cl can actually accommodate more bonds than supported by an 8et. But that is not the case here.

 

Did you notice?

Considering the above H can never be in the middle of a skeleton because it can only make one possible bond, so would not be able to hold more than one thing together.