Câu hỏi phỏng vấn Sorting
Câu hỏi

What's the difference between External vs Internal sorting?

Câu trả lời

The main difference between external and internal sorting is the location of the data being sorted:

  • Internal sorting is used when the entire dataset fits in the computer's main memory (RAM). The sorting algorithms operate entirely within RAM, allowing for faster access to the data. Examples of internal sorting algorithms include Quick Sort, Bubble Sort, Insertion Sort, and Heap Sort[1][2][3].

  • External sorting is necessary when the dataset is too large to fit in RAM. In this case, the data is stored on external storage devices like hard disks or solid-state drives. The sorting process involves loading smaller chunks of data into memory, sorting them, and then merging the sorted subsets. This allows sorting of massive datasets that exceed the available memory capacity. Merge Sort and its variations are commonly used for external sorting[1][2][3].

The choice ...

middle

middle

Gợi ý câu hỏi phỏng vấn

middle

What is "stability" in sorting algorithms and why is it important?

junior

What are advantages and disadvantages of Bubble Sort?

junior

What is meant by to "Sort in Place"?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào