On the cubicity of certain graphs