on giving the input 1
2
4
5
6
8
-1
my output is 4–>2–>1–>2–>4–>5–>6–>8–>
4–>2 is getting printed extra
Linked list taking in put
hello @jatinupadhyay786
it working fine.
remove all other extra code from main that is not related to reading input.
