Challenge Information

Title : Sub string with Distinct Characters
Difficulty : Easy
Solutions : 13
Maximum Score : 50
Completed by You: No
Description :

There is a string given. You have to find the length of the longest substring with all distinct characters.

Write a function solve that have the following parameter(s):
1.) a = string

Example
Input:
There is a string given:
a = dead
Output: The function will return,
3

Explanation
The longest substring with all distinct characters is "dea".

Example
Input:
There is a string given:
a = football
Output: The function will return,
5

Explanation
The longest substring with all distinct characters is "otbal".

Constraints

Judocode