Netskope Interview Question

Length of maximum non repeating subsequence in string. Also find that subsequence. Also tell what code changes to be done if repeating characters are allowed