Pergunta de entrevista da empresa Energy Exemplar

Check if the Linked List is palindrome or not?? Detect loop in a linked list

Resposta da entrevista

Sigiloso

28 de ago. de 2024

1)for the first question I started with the brute force approach of using a stack for finding out if the given linked list is a palindrome or not, then the interviewer asked me to give a optimized approach. The optimal approach was to reverse half of the array, the interviewer was happy with this approach so we moved on to the next question.