second max elements of linked list

Given a single linked list of integers, write a function to find the 2nd largest element from the list in linear time without extra space. Test for all the test cases.

I know its easy. Just thought to share this question with others as it is asked in microsoft interview.

Comments

Popular posts from this blog