private static int solve2(int n) {
        if (n <= 0)
            return 0;
        int k = 0;
        int currentIndex = 0;
        for (int i = 1; i <= 50_000_000; i++) {
            currentIndex = (n + currentIndex) % i + 1;
            if (currentIndex - 1 == 0) {
                k = i;
            }
        }
        return k;
    }
Why Did you create this class? what does it do?
src/adventofcode/Spinlock_17.java