We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abf715a commit e466cb5Copy full SHA for e466cb5
find_m_to_last_llist.py
@@ -1,3 +1,8 @@
1
+# Given a linked list, this method
2
+# will return m'th element to the last
3
+# 2->3->4->8->5; m=2 will return 8
4
+# since 8 is second to last
5
+
6
def findMToLast(l_list, m):
7
current = l_list.head
8
count = 0
0 commit comments