Created
July 25, 2023 14:28
-
-
Save L8RFN/51ed882d2c0cb493cd83a96522dc41c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
} | |
public void insertToHead(int val){ | |
if(isEmpty()){ | |
head= new node(); | |
head.data=val; | |
head.next=null; | |
tail=head; | |
} | |
else{ | |
node nn= new nod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment