TheRealSamuel/LeetCodeProblem
0574
1{2 "id": 3408,3 "name": "count_the_number_of_special_characters_i",4 "difficulty": "Easy",5 "link": "https://leetcode.com/problems/count-the-number-of-special-characters-i/",6 "date": "2024-04-14 00:00:00",7 "task_description": "You are given a string `word`. A letter is called **special** if it appears **both** in lowercase and uppercase in `word`. Return the number of_ _**special** letters in_ _`word`. **Example 1:** **Input:** word = \"aaAbcBC\" **Output:** 3 **Explanation:** The special characters in `word` are `'a'`, `'b'`, and `'c'`. **Example 2:** **Input:** word = \"abc\" **Output:** 0 **Explanation:** No character in `word` appears in uppercase. **Example 3:** **Input:** word = \"abBCab\" **Output:** 1 **Explanation:** The only special character in `word` is `'b'`. **Constraints:** `1 <= word.length <= 50` `word` consists of only lowercase and uppercase English letters.",8 "public_test_cases": [9 {10 "label": "Example 1",11 "input": "word = \"aaAbcBC\"",12 "output": "3 "13 },14 {15 "label": "Example 2",16 "input": "word = \"abc\"",17 "output": "0 "18 },19 {20 "label": "Example 3",21 "input": "word = \"abBCab\"",22 "output": "1 "23 }24 ],25 "private_test_cases": [26 {27 "input": "CFuALywXqxoZfVgiHtU",28 "output": 329 },30 {31 "input": "ubUZHXCBAVNnrTgmIcqzwsOYhKEaMivSG",32 "output": 1233 },34 {35 "input": "UPnjoxhgiwqzsStrVfpk",36 "output": 237 },38 {39 "input": "tyLeVEmcNk",40 "output": 141 },42 {43 "input": "WUeZbIqcdCiVvsazlOMpwTAG",44 "output": 645 }46 ],47 "haskell_template": "numberOfSpecialChars :: String -> Int\nnumberOfSpecialChars word ",48 "ocaml_template": "let numberOfSpecialChars (word: string) : int = ",49 "scala_template": "def numberOfSpecialChars(word: String): Int = { \n \n}",50 "java_template": "class Solution {\n public int numberOfSpecialChars(String word) {\n \n }\n}",51 "python_template": "class Solution(object):\n def numberOfSpecialChars(self, word):\n \"\"\"\n :type word: str\n :rtype: int\n \"\"\"\n "52}