Pergunta de entrevista da empresa Mirketa

Sorting of linked list approach in Notepad

Resposta da entrevista

Sigiloso

8 de jul. de 2025

I first clarified whether the linked list was singly or doubly linked. Then, I explained that since random access isn’t possible in a linked list, Merge Sort is the most optimal algorithm due to its O(n log n) time and minimal extra space for linked structures. I then wrote the approach in plain Notepad, starting with the logic to find the middle of the list using the slow-fast pointer method, recursively sorting both halves, and then merging them. I added comments in the code for better readability and walked the interviewer through each step.