This video is about Insert a node at a specific position in a linked list.
Problem Description:
You’re given the pointer to the head node of a linked list, an integer to add to the list and the position at which the integer must be inserted. Create a new node with the given integer, insert this node at the desired position and return the head node.
A position of 0 indicates head, a position of 1 indicates one node away from the head and so on. The head pointer given may be null meaning that the initial list is empty.
As an example, if your list starts as 1-2-3 and you want to insert a node at position 2 with data=4, your new list should be 1-2-4-3
Problem:
https://www.hackerrank.com/challenges...
Code Sample:
https://www.coderscart.com/insert-a-n...
Linear Linked List in detail
Part-1. • Singly Linked List Part-1
Part-2. • Singly LinkedList part-2
Part-3. • Singly Linkedlist part-3
Part-4. • Reverse LinkedList
For 1 : 1 Tutoring
WhatsApp contact : 7278222619
mail: [email protected]
You can support via UPI : sattujaiswal@okhdfcbank
Follow us on:
Whatsapp:
https://chat.whatsapp.com/LNwHGukUizj...
Facebook:
/ codingcart
Linkedin:
/ satyendra-jaiswal-903588a2
/ codingcart
Instagram:
/ codingcart
#HackerRank #LinkedList #DataStructure #Interview
Watch video Insert a node at a specific position in a linked list [HackerRank] | Data Structure | Linked List online without registration, duration hours minute second in high quality. This video was added by user Coding Cart 03 February 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,646 once and liked it 44 people.