Online assessment how to solve?

Month ago I had some online assessment and was dealing with HR platform.

I had an issue trying to solve the question which was noted as
"find the maximum element in the linked list"

during the coding I was straggling to try get the result since I did not know how to get the VALID input..
1)The pure list and iteration was not correct, like [4,2,13,9,-4,1]

  1. also trying to make it as a referenceto pointer, so I get the pointer to the head of the list was not working,
    eg. 5 - where this is a pointe rto the linked list and looping through
    current = current.next
    with linked list logic was not working either...

not sure how to determine the input then?
how would you try to get the input when it says it is SINGLY LINKED LIST, what input would u pass?

Comments (1)