The methods described above have -1 as the last element so that we can use while loop. But how do I do it here?
How do I input the linked list?
@Doctor_Insult you are given the count, you can use that run the while loop till count>0 , in every iteration decrease the count by 1.
If this resolves your doubt mark it as resolved.
thanks for the help.