Tải bản đầy đủ (.doc) (2 trang)

Cấu Trúc Dữ Liệu _ Chương 11

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (128.75 KB, 2 trang )

DỊCH SANG TIẾNG VIỆT CHƯƠNG 11.
DỊCH SANG TIẾNG VIỆT CHƯƠNG 11.
Slide1:
1/Examine the linear search and binary search algorithms:
Khảo sát những dãy thuật về tìm kiếm tuyến tính và tìm kiêm nhị phân
2/Examine several sorting algorithms, including:
selection sort
insertion sort
bubble sort
quick sort
merge sor
Khảo sát và phân loại những dãy thuật,bao gồm:
selection sort
insertion sort
bubble sort
quick sort
merge sort
3/Discuss the complexity of these algorithms
Bàn luận về sự phức tạp của những dãy thuật này
Slide2:
1/Searching
Sự tìm kiếm
2/Searching is the process of finding a target element among a group of items (the search
pool), or determining that it isn't there
Sự tìm kiếm là quá trình tìm thấy một phần tử đích tong một nhóm các phần tử khác
(tìm kiếm nhóm), hoặc xác định nó có ở đó hay không
3/This requires repetitively comparing the target to candidates in the search pool
Những yêu cầu này lặp lại việc so sánh phần tử đích đến những đối tượng khác trong nhóm tìm
kiếm
4/An efficient sort performs no more comparisons than it has to
Một lệnh tìm kiếm thi hành không nhiều hơn sự so sánh nó


5/The size of the search pool is a factor
Kích thước của nhóm tìm kiếm cũng là một nhân tố
Slide3:
1/The Comparable Interface
Giao diÖn Cã thÓ so s¸nh ®ưîc
2/We want to define the algorithms such that they can search any set of objects
Chúng ta muốn định nghĩa những dãy thuật sao cho chúng có thể tìm bát kì những đối tượng nào
đã được thiết đăt
3/Therefore we will search objects that implement the Comparable interface
Vì vậy, chúng ta sẽ tìm những đối tượng nào mà thực thi phương thức của Comparable
4/It contains one method, compareTo, which is designed to return an integer that specifies the
relationship between two objects:
obj1.compareTo(obj2)
Comparable nó thực hiện phương thức compareTo , phương thức này được thiết kế để trả về một
số nguyên mà nó chỉ rõ mối quan hệ giữa hai đối tượng
5/This call returns a number less than, equal to, or greater than 0 if obj1 is less than,
equal to, or greater than obj2, respectively

×