package suanfa;

import suanfa.doubleLinkedList.Node;

public class solution {
    
    
    public Node find(Node head,int k){
        
        int size=0;
        Node current=head;
        while(current !=null){
            
            size+=1;
            current=current.next;
            
        }
        
        for (int i=0;i<size-k;i++){
            
            
            head=head.next;
        }
        return head;
    }

}

 

相关文章:

  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2021-07-08
  • 2021-10-31
  • 2022-12-23
猜你喜欢
  • 2021-09-02
  • 2021-12-10
  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
相关资源
相似解决方案