Optical and electrochemical properties of pure and Ti-doped CdO nanoparticles for device applications