Sort by

recency

|

1913 Discussions

|

  • + 0 comments

    in javascript the solution for me was just a line:

    return s.split(/[A-Z]/).length

  • + 0 comments

    def camelcase(s): c = 1 for i in range(len(s)): if s[i] == s[i].upper(): c += 1 return c

  • + 0 comments

    My solution in java 15

    var sarr= s.split("(?=\p{Lu})"); return sarr.length;

  • + 0 comments
    def minimumNumber(n, password):
        # Return the minimum number of characters to make the password strong
        minLength = 6
        patterns = [r'[0-9]', r'[a-z]', r'[A-Z]', r'[!@#$%^&\*\(\)\-\+]']
        total_chars = sum([1 for pattern in patterns if not re.search(pattern, password)])
        total_chars += (0 if minLength <= n + total_chars else minLength - n - total_chars)
        return total_chars
    
  • + 0 comments

    my python solution

    def camelcase(s):

    tot = 1
    for char in s:
        if char.isupper():
            tot += 1
    return tot