Algorithm to find the mth element from the end of list
@banashree-patra-m0OJwR
โข
Oct 26, 2024
Oct 26, 2024
1.3K
Given a singly-linked list, devise a time and space efficient algorithm to find the mth
element from the end of the list.
If m = 0, then your algorithm should return the last element of the list. It should also
take care of boundary conditions. Analyze the time complexity of your algorithm.