private static int solve(int n) {
        if (n <= 0)
            return 0;
        Map<Node, Integer> map = new HashMap<>();
        Node current = new Node(0, null);
        Node root = current;
        map.put(current, 0);
        Node ipNode;
        for (int i = 1; i <= 2017; i++) {
            int ip = (n + map.get(current)) % map.size();
            ipNode = findByIndex(root, ip);
            ipNode.next = new Node(i, ipNode.next);
            map.put(ipNode.next, ip + 1);
            current = ipNode.next;
        }
        return current.next.value;
    }
Why Did you create this class? what does it do?
src/adventofcode/Spinlock_17.java