Linked List Series #1 - Insert at the beginning and End of Linked List in JAVA

Опубликовано: 14 Октябрь 2024
на канале: Code With Ease - By Varsha
570
13

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.

Practice links: https://practice.geeksforgeeks.org/pr...