Cognizant interview question

selection sort , patterns ,array ,strings