Pure Functions

    public int addNumbers(int a, int b) {
        return a + b;
    }
    
    public int countUnique(List<String> names) {
        Set<String> nameSet = new HashSet<>(names);
        return nameSet.size();
    }
    
    public List<String> filterANames(List<String> names) {
        List<String> result = new ArrayList<>();
        for(String name : names) {
            if(name.startsWith("A")) {
                result.add(name);
            }
        }
        return result;
    }

    18 / 22