Skip to content

Instantly share code, notes, and snippets.

@Mahdhir
Created May 2, 2020 13:17
Show Gist options
  • Save Mahdhir/4c7e6da9fa99d26e9f523f9ea076f578 to your computer and use it in GitHub Desktop.
Save Mahdhir/4c7e6da9fa99d26e9f523f9ea076f578 to your computer and use it in GitHub Desktop.

Revisions

  1. Mahdhir created this gist May 2, 2020.
    10 changes: 10 additions & 0 deletions Search.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    Node search(int key){
    Node temp = head;
    while(temp != null){
    if(temp.key == key){
    return temp;
    }
    temp = temp.next;
    }
    return null;
    }