Insert a node at a specific position in a linked list [HackerRank] | Data Structure | Linked List

Опубликовано: 03 Февраль 2020
на канале: Coding Cart
2,646
44

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


Смотрите видео Insert a node at a specific position in a linked list [HackerRank] | Data Structure | Linked List онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Coding Cart 03 Февраль 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,646 раз и оно понравилось 44 людям.