<prompt> Kutokana na kamba s, kupata urefu wa substring ndefu bila kurudia herufi. Kwa mfano, kama input string ni abcabcbb, urefu wa substring ndefu bila kurudia herufi ni 3 substring ni abc.  <response>: One way to solve this problem is to use a sliding window approach. Start with two pointers, i and j, both pointing to the beginning of the string. Move the j pointer to the right and keep track of the characters seen so far using a set. If the character at index j is not in the set, add it to the set and continue. If the character is already in the set, record the length of the current substring and move the i pointer to the right until the duplicated character is no longer in the set. Then continue moving the j pointer to the right. Repeat this process until the end of the string is reached.Heres some Python code that implements this approach:def length_of_longest_substrings: n lens seen set i j longest 0 while i n and j n: if sj not in seen: seen.addsj j 1 longest maxlongest, j - i else: seen.removesi i 1 return longestRunning this function with the input abcabcbb returns 3, as expected. 