Sorting (Discussion 10) (Các thuật toán sắp xếp) - Christine Zhou
- 페이지 수
- 10
- 형식
- PPTX
- 크기
- 301 KB
- Trường
- University of California, Berkeley
- 조회수
- 0
- 댓글
- 0
- Lượt tải
- 0
미리보기 생성 중...
Slide bài giảng thảo luận về các thuật toán sắp xếp: Insertion Sort, Selection Sort, Merge Sort, Heapsort, Quicksort, Counting Sort, Radix Sort.
- 문서명
- Sorting (Discussion 10) (Các thuật toán sắp xếp) - Christine Zhou
- 학교 / 강의
- University of California, Berkeley · Lập trình Java
- 내용
- Tài liệu giới thiệu và mô tả ngắn gọn các thuật toán sắp xếp phổ biến như Insertion Sort, Selection Sort, Merge Sort, Heapsort, Quicksort, Counting Sort và Radix Sort. Ngoài ra, có các thông báo về lịch học, bài tập và dự án.
- 목차
- Agenda
- Announcements
- Insertion Sort
- Selection Sort
- Merge Sort
- Heapsort
- Quicksort
- Counting Sort
- Radix Sort
- 페이지 수
- 10 페이지
- 업로더
- Uni24h
설명
Trích nội dung tài liệu
Discussion 10: Sorting Christine Zhou Agenda Announcements We’ll try to get through all the worksheet, but no guarantees Announcements Midterm 2 is tomorrow! Check room assignments HW6 due Friday Project 2 milestone due on Monday, just need to pass the integration tests Best of luck!! No slip hours for this! You do not need your game fully functioning, remember these integration tests are not comprehensive! Extra office hours Monday and Wednesday night! 6-8PM More details to come later Insertion Sort Have a sorted portion and a non-sorted portion In the non-sorted portion, pick the first element and “insert” its correct position Keeping swapping with whatever is to the left Will be at the right position when the left element is less than the element you are inserting Selection Sort Scan through the array, always “selecting” the smallest item and bringing it to the front Merge Sort Split array into two equal partitions Call mergesort on each of the partitions Now the partitions are sorted or the partitions are one element Merge the two halves together Have pointers to each partitions and combine them so the partitions are now sorted Heapsort Use a max heap Algorithm: Turn elements into a heap, represent with an array Repeat: remove max and rearrange heap, put max at the end Quicksort Pick a pivot Divide array into 3 parts: less than portion, equal to portion, greater than portion Repeat previous steps on 1st and 3rd if they include more than one element Runtime: Average case: 𝚹(NlogN) Worst case: 𝚹(N^2) Counting Sort Keep an array called counts that keeps track of the count of each value, go through the entire array and collect the counts Keep an array called starts and this will tell us where to start for each element, go through the counts and collect the starts Go through all the elements of the array and place the element where it should belong based on the starts array Runtime: N is the nu
자주 묻는 질문
이 문서는 무료인가요?
네. “Sorting (Discussion 10) (Các thuật toán sắp xếp) - Christine Zhou” 문서는 무료입니다. 로그인 후 '다운로드'를 클릭하여 원본 파일을 받으세요.
이 문서는 몇 페이지로 되어 있나요?
이 문서는 10페이지입니다, Lập trình Java 과정용. 다운로드하기 전에 온라인으로 미리 볼 수 있습니다.
다운로드하기 전에 미리 볼 수 있나요?
네. 이 페이지의 온라인 리더를 통해 문서를 미리 본 후 다운로드 여부를 결정할 수 있습니다.
Sorting (Discussion 10) (Các thuật toán sắp xếp) - Christine Zhou
미리보기 생성 중...
Trích nội dung tài liệu
Discussion 10: Sorting Christine Zhou Agenda Announcements We’ll try to get through all the worksheet, but no guarantees Announcements Midterm 2 is tomorrow! Check room assignments HW6 due Friday Project 2 milestone due on Monday, just need to pass the integration tests Best of luck!! No slip hours for this! You do not need your game fully functioning, remember these integration tests are not comprehensive! Extra office hours Monday and Wednesday night! 6-8PM More details to come later Insertion Sort Have a sorted portion and a non-sorted portion In the non-sorted portion, pick the first element and “insert” its correct position Keeping swapping with whatever is to the left Will be at the right position when the left element is less than the element you are inserting Selection Sort Scan through the array, always “selecting” the smallest item and bringing it to the front Merge Sort Split array into two equal partitions Call mergesort on each of the partitions Now the partitions are sorted or the partitions are one element Merge the two halves together Have pointers to each partitions and combine them so the partitions are now sorted Heapsort Use a max heap Algorithm: Turn elements into a heap, represent with an array Repeat: remove max and rearrange heap, put max at the end Quicksort Pick a pivot Divide array into 3 parts: less than portion, equal to portion, greater than portion Repeat previous steps on 1st and 3rd if they include more than one element Runtime: Average case: 𝚹(NlogN) Worst case: 𝚹(N^2) Counting Sort Keep an array called counts that keeps track of the count of each value, go through the entire array and collect the counts Keep an array called starts and this will tell us where to start for each element, go through the counts and collect the starts Go through all the elements of the array and place the element where it should belong based on the starts array Runtime: N is the nu
- 문서명
- Sorting (Discussion 10) (Các thuật toán sắp xếp) - Christine Zhou
- 학교 / 강의
- University of California, Berkeley · Lập trình Java
- 내용
- Tài liệu giới thiệu và mô tả ngắn gọn các thuật toán sắp xếp phổ biến như Insertion Sort, Selection Sort, Merge Sort, Heapsort, Quicksort, Counting Sort và Radix Sort. Ngoài ra, có các thông báo về lịch học, bài tập và dự án.
- 목차
- Agenda
- Announcements
- Insertion Sort
- Selection Sort
- Merge Sort
- Heapsort
- Quicksort
- Counting Sort
- Radix Sort
- 페이지 수
- 10 페이지
- 업로더
- Uni24h
댓글 (0)
댓글이 없습니다. 첫 댓글을 남겨보세요!
Java DataBase Connectivity - Kết nối kho dữ liệu Java
Ôn tập lập trình Java (MT2 Review Solutions) - Ching and Christines
Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou
Introduction to Java (Discussion 1) (Giới thiệu về Java) - Christine Zhou
Giáo trình Lập trình Java
Tổng hợp Đề Toán 5 - Luyện thi vào Lớp 6 - CLB EMath
Bài giảng vật lý đại cương (Chương 3) - Đỗ Ngọc Uấn
Chương 8.Nguyên tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang

댓글 (0)
댓글이 없습니다. 첫 댓글을 남겨보세요!