Creating a set to store the last positions of occurrence
using System ; using System . Collections . Generic ; class GFG { static int longestUniqueSubsttr ( string s ) { Dictionary < char , int > seen = new Dictionary < char , int > ( ) ; int maximum_length = 0 ;