Cognizant interview question

Simple palendrom question and triangle using star