Link list k append


pls help me to resolve this

Hello @jontysingla85,

There are two mistakes in your code:

  1. Incorrect input read in takeinput() function. Your function is also reading the value k.
  2. You have not considered the case when k>=n

I have modified your code:

Hope, this would help.
Give a like if you are satisfied.