• + 0 comments
        Stack<Integer> stack = new Stack<>();
    
    while(llist != null) {
        stack.push(llist.data);
        llist = llist.next;
    }
    
    for (int i = 0; i < positionFromTail; i++) {
        stack.pop();
    }
    
    // The top of the stack is now the desired node
    return stack.pop();