pls help me to resolve this
Link list k append
Hello @jontysingla85,
There are two mistakes in your code:
- Incorrect input read in takeinput() function. Your function is also reading the value k.
- 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.