Back to problems

Sliding Window Character Count

Algorithm · Salesforce · Medium

Given an input string s, your task is to determine the length of the longest contiguous substring in which every character appears at most once. In other words, find the maximum possible length of a substring that consists entirely of unique characters. A substring is a contiguous block of characters taken from the original string; you cannot skip characters or change their order. The string s may contain any printable ASCII characters, including uppercase and lowercase…

Checking your access…