-
Notifications
You must be signed in to change notification settings - Fork 53
Linked List Insertion #68
Copy link
Copy link
Closed
Labels
CC Programming LanguageC Programming Languagec++C++ Programming LanguageC++ Programming Languagegood first issueGood for newcomersGood for newcomershacktoberfestHacktoberfest IssueHacktoberfest Issuehacktoberfest-2023Hacktoberfest 2023 IssueHacktoberfest 2023 Issuehacktoberfest-acceptedAccepted for HacktoberfestAccepted for Hacktoberfestnot-assignedIssue Not assigned yetIssue Not assigned yetpythonPython Programming LanguagePython Programming Language
Metadata
Metadata
Assignees
Labels
CC Programming LanguageC Programming Languagec++C++ Programming LanguageC++ Programming Languagegood first issueGood for newcomersGood for newcomershacktoberfestHacktoberfest IssueHacktoberfest Issuehacktoberfest-2023Hacktoberfest 2023 IssueHacktoberfest 2023 Issuehacktoberfest-acceptedAccepted for HacktoberfestAccepted for Hacktoberfestnot-assignedIssue Not assigned yetIssue Not assigned yetpythonPython Programming LanguagePython Programming Language
❗Write Code in Only One Language ( CPP , C , Java , Python )
Give File Name :
Linked List Insertion✅ In respective language folder📑 DESCRIPTION
Linked List Insertion
Create a link list of size N according to the given input literals. Each integer input is accompanied by an indicator which can either be 0 or 1. If it is 0, insert the integer in the beginning of the link list. If it is 1, insert the integer at the end of the link list.
Hint: When inserting at the end, make sure that you handle NULL explicitly.
Example 1:
Example 2:
Follow-up: Can you come up with an algorithm that is less than O(n^2) time complexity?