• + 0 comments

    public static int utopianTree(int n) { // Write your code here int output = 0;

        for(int i = 0; i <= n; i++){
            if (i % 2 == 0 || i == 0) output = output + 1;
            else output = output + output;
        }
        return output;
    }