✅✅✅|| Simple and easy solution ✅✅✅ with explanation || Using java and python ✅✅✅
PLEASE UPVOTE IF YOU FIND IT HELPFUL\n# Intuition\nThe goal is to count the number of people whose age is greater than 60 from a list of strings. Each string co
# PLEASE UPVOTE IF YOU FIND IT HELPFUL\n# Intuition\nThe goal is to count the number of people whose age is greater than 60 from a list of strings. Each string contains detailed information, and the age is located at a specific position.\n\n# Approach\nExtract Age: For each entry in the list of details, extract the substring that represents the age.\nConvert to Integer: Convert the extracted substring to an integer.\nCount Seniors: Check if the age is greater than 60. If so, increment the count.\n# Complexity\n- Time complexity: O(n), where n is the number of elements in the details array. We iterate over each element once and perform a constant amount of work for each.\n- Space complexity: O(1), as we use a constant amount of extra space (only a few integer variables, regardless of the input size).\n\n# Code\n```java []\nimport java.util.*;\nclass Solution {\n    public int countSeniors(String[] details) {\n        int count=0;\n        for(String i:details){\n            int age=Integer.parseInt(i.substring(11,13));\n            if(age>60){\n                count+=1;\n            }\n        }\n        return count;\n    }\n}\n```\n```python []\nclass Solution:\n    def countSeniors(self, details: List[str]) -> int:\n        count=0\n        for i in details:\n            if(int(i[11:13])>60):\n                count+=1\n        return count\n\n```
['Java', 'Python3']