Created
May 2, 2020 13:14
-
-
Save Mahdhir/81aa50f05df775add004953df21a303b 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 insertAtBeginning(int new_data) { | |
// insert the data | |
Node new_node = new Node(new_data); | |
new_node.next = head; | |
head = new_node; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment