tag:blogger.com,1999:blog-8712770457197348465.post9188256331213833350..comments2019-10-21T18:33:26.060-07:00Comments on Javarevisited: How to find the 3rd (kth) Node from end or tail in a linked list in Javajavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8712770457197348465.post-64350265709731868022019-06-08T21:01:26.065-07:002019-06-08T21:01:26.065-07:00This one is also O(n) No? both time and space comp...This one is also O(n) No? both time and space complexity is O(N) as this just uses two pointers no matter how many nodes are in the list.javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-13020406257681694702019-06-08T20:32:33.801-07:002019-06-08T20:32:33.801-07:00Easiest Solution in O(n)
https://youtu.be/cKqhgrPh...Easiest Solution in O(n)<br />https://youtu.be/cKqhgrPhZe4Unknownhttps://www.blogger.com/profile/06110420871392106342noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-79302733408995866232016-08-24T21:51:01.241-07:002016-08-24T21:51:01.241-07:00I was asked how to find the 2nd element from the l...I was asked how to find the 2nd element from the last in a singly linked list in recent interview. Follow-up question was how do you detect the cycle on linked list i.e. where one of the node points to previous node in singly linked list. I was manage to answer both of them but stuck when they asked, how do you find the start of the cycle? Do you know how to solve this problem? Can the two Anonymousnoreply@blogger.com