Microsoft interview question

Q. write a code to get Longest nonrepeating sequence