• + 0 comments
    int height = 0;
        int i = 0;
        while(i<=n) {
            height = i % 2 ==0 ? height + 1 : height * 2;
            i++;
        }
        return height;