My H1B visa was issued on oct-2012 and expired on June-2015. am i eligible for H1B cap?

My H1B visa was issued on oct-2012 and expired on June-2015. After that I went outside the US for a year.

Now i come back in US on L1B status on May-2016 ? so am i eligible for H1B Cap-exempt?

Yes, you are eligible for cap-exempt petition. However, you would be eligible for only 6 years minus time already spent inside US on H-1 and L-1. To avail tenure beyond that, your GC process needs to be in play.

Thank you for the answer.
I was outside the US for a year (May 2015-16), so it will not count. am i correct?

If you are going for cap-exempt route, then clock is not reset even if you stayed outside US for 1 year. If you go for cap-subject route, then clock is reset and only L-1 stay since May 2016 is counted.