TAILIEUCHUNG - Sorting part 1

This chapter almost doesn’t belong in a book on numerical methods. However, some practical knowledge of techniques for sorting is an indispensable part of any good programmer’s expertise. We would not want you to consider yourself expert in numerical techniques while remaining ignorant of so basic a subject. In conjunction with | Chapter 8. Sorting Introduction This chapter almost doesn t belong in a book on numerical methods. However some practical knowledge of techniques for sorting is an indispensable part of any good programmer s expertise. We would not want you to consider yourself expert in numerical techniques while remaining ignorant of so basic a subject. In conjunction with numerical work sorting is frequently necessary when data either experimental or numerically generated are being handled. One has tables or lists of numbers representing one or more independent or control variables and one or more dependent or measured variables. One may wish to arrange these data in various circumstances in order by one or another of these variables. Alternatively one may simply wish to identify the median value or the upper quartile value of one of the lists of values. This task closely related to sorting is called selection. Here more specifically are the tasks that this chapter will deal with Sort . rearrange an array of numbers into numerical order. Rearrange an array into numerical order while performing the corresponding rearrangement of one or more additional arrays so that the correspondence between elements in all arrays is maintained. Given an array prepare an index table for it . a table of pointers telling which number array element comes first in numerical order which second and so on. Given an array prepare a rank table for it . a table telling what is the numerical rank of the first array element the second array element and so on. Select the Mth largest element from an array. For the basic task of sorting N elements the best algorithms require on the order of several times N log2 N operations. The algorithm inventor tries to reduce the constant in front of this estimate to as small a value as possible. Two of the best algorithms are Quicksort invented by the inimitable . Hoare and Heapsort invented by . Williams. For large N say 1000 Quicksort is .

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.