Preparation and gas sensing properties of undoped and Pd-doped TiO2 nanowires