Pregunta de entrevista de Amazon Web Services

Coding sample: Given a randomized list of numbers, how can you retrieve the second smallest and second largest?

Respuesta de la entrevista

Anónimo

28 oct 2022

Pseudo-code a merge sort or bubble sort algorithm and retrieve items 1 (second smallest) and N-2 (second largest).