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. But not across the rows. For ex O vs Br, it is Br that has the more ability to bond.

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

 

 This is frequently referred to as "Bonding Capacity"

See additional bonding capacities.

 

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 that would not work, since Cl needs two bonds to connect one to H and a second one to oxygen.

Sine it only has one, it could not exist in the middle of the skeleton. Instead oxygen which can indeed have two bonds will be a fit.

Thus O goes in the middle in spite of the fact that Cl has the lower electronegativity.

 

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.