Java Stream O(N)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nimport java.util.stream.Stream;\n\nclass Solution {\n    public int countSeniors(String[] details) {\n        return (int) Stream.of(details) // Convert array to Stream\n            .map(e -> e.substring(11, 13)) // Extract age substring\n            .map(Integer::parseInt) // Convert substring to int\n            .filter(age -> age > 60) // Filter ages greater than 60\n            .count(); // Count the number of elements that pass the filter\n    }\n}\n\n```
['Java']