Skip to content

feature to add input #749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions data_structures/linked_list/singly_linked_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,20 @@ def reverse(self):

def main():
A = Linked_List()
print("Inserting 10 at Head")
A.insert_head(10)
print("Inserting 0 at Head")
A.insert_head(0)
print("Inserting 1st at Head")
a1=input()
A.insert_head(a1)
print("Inserting 2nd at Head")
a2=input()
A.insert_head(a2)
print("\nPrint List : ")
A.printList()
print("\nInserting 100 at Tail")
A.insert_tail(100)
print("Inserting 1000 at Tail")
A.insert_tail(1000)
print("\nInserting 1st at Tail")
a3=input()
A.insert_tail(a3)
print("Inserting 2nd at Tail")
a4=input()
A.insert_tail(a4)
print("\nPrint List : ")
A.printList()
print("\nDelete Head")
Expand Down