should i have to consider case when k is negative?
LINKED LIST-K APPEND problem
No, there is no need to consider the case when k is negative, but yes u need to consider the case when k is greater than N, the size of linked list, so take a mod value, as k=k%N, to work for that test case.
1 Like