TAILIEUCHUNG - Thuật toán Algorithms (Phần 12)

Tham khảo tài liệu 'thuật toán algorithms (phần 12)', khoa học tự nhiên, toán học phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 9. Quicksort In this chapter we ll study the sorting algorithm which is probably more widely used than any other Quicksort. The basic algorithm was invented in 1960 by C. A. R. Hoare and it has been studied by many people since that time. Quicksort is popular because it s not difficult to implement it s a good general-purpose sort works well in a variety of situations and it consumes less resources than any other sorting method in many situations. The desirable features of the Quicksort algorithm are that it is in-place uses only a small auxiliary stack requires only about N log N operations on the average to sort N items and has an extremely short inner loop. The drawbacks of the algorithm are that it is recursive implementation is complicated if recursion is not available has a worst case where it takes about N2 operations and is fragile a simple mistake in the implementation might go unnoticed and could cause it perform badly for some files. The performance of Quicksort is very well understood. It has been subjected to a thorough mathematical analysis and very precise statements can be made about performance issues. The analysis has been verified by extensive empirical experience and the algorithm has been refined to the point where it is the method of choice in a broad variety of practical sorting applications. This makes it worthwhile to look somewhat more carefully at ways of efficiently implementing Quicksort than we have for other algorithms. Similar implementation techniques are appropriate for other algorithms with Quicksort we can use them with confidence because the performance is so well understood. It is tempting to try to develop ways to improve Quicksort a faster sorting algorithm is computer science s better mousetrap. Almost from the moment first published the algorithm improved versions have been appearing in the literature. Many ideas have been tried and analyzed but it is easy to be deceived because the algorithm is so well balanced that the .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.