Li Huichen Xue Zhendong Bai Yiwei Gao Bicheng Xie Tiancheng Sun Xingyuan Ye Zihao Yang Runzhe Cai Wanxin You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Li Huichen Gao Bicheng Xie Tiancheng Sun Xingyuan Ye Zihao Yang Runzhe Cai Wanxin You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Li Huichen Gao Bicheng Xie Tiancheng Sun Xingyuan Ye Zihao Yang Runzhe Cai Wanxin You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Li Huichen Gao Bicheng Xie Tiancheng Sun Xingyuan Ye Zihao Yang Runzhe Cai Wanxin You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Li Huichen Gao Bicheng Xie Tiancheng Sun Xingyuan Cai Wanxin Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Li Huichen Gao Bicheng Xie Tiancheng Sun Xingyuan Cai Wanxin Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Li Huichen Gao Bicheng Cai Wanxin Sun Xingyuan Xie Tiancheng Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Li Huichen Gao Bicheng Cai Wanxin Sun Xingyuan Xie Tiancheng Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Cai Wanxin Gao Bicheng Li Huichen Sun Xingyuan Xie Tiancheng Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Cai Wanxin Gao Bicheng Li Huichen Sun Xingyuan Xie Tiancheng Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Cai Wanxin Gao Bicheng Li Huichen Sun Xingyuan Xie Tiancheng Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Cai Wanxin Gao Bicheng Li Huichen Sun Xingyuan Xie Tiancheng Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Cai Wanxin Gao Bicheng Li Huichen Sun Xingyuan Xie Tiancheng Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Bai Yiwei Xue Zhendong Cai Wanxin Gao Bicheng Li Huichen Sun Xingyuan Xie Tiancheng Yang Runzhe Ye Zihao You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Physical Exercise!
Analyzing Insertion Sort blackboard
Analyzing Insertion Sort
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons This class
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons This class 34
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons This class 34 561
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons This class 34 561 Jiaotong students
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons This class 34 561 Jiaotong students 41297
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons This class 34 561 Jiaotong students 41297 852,700,456
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons Runtime This class 34 561 Jiaotong students 41297 852,700,456
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons Runtime This class 34 561 Jiaotong students 41297 852,700,456 1 second
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons Runtime This class 34 561 Jiaotong students 41297 852,700,456 1 second Shanghai Residents
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons Runtime This class 34 561 Jiaotong students 41297 852,700,456 1 second Shanghai Residents 24 mio
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons Runtime This class 34 561 Jiaotong students 41297 852,700,456 1 second 294 × 10 12 Shanghai Residents 24 mio
Analyzing Insertion Sort Sorting n items can require up to n ( n − 1) comparisons. 2 Set Size Comparisons Runtime This class 34 561 Jiaotong students 41297 852,700,456 1 second 294 × 10 12 Shanghai Residents 24 mio 95 hours
Faster computers don’t solve this problem.
Faster computers don’t solve this problem. Better algorithms do.
A smarter sorting algorithm
Ye Zihao Xue Zhendong Li Huichen Gao Bicheng Xie Tiancheng Sun Xingyuan Bai Yiwei Yang Runzhe Cai Wanxin You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng
Ye Zihao Xue Zhendong Li Huichen Gao Bicheng Xie Tiancheng Sun Xingyuan Bai Yiwei Yang Runzhe Cai Wanxin You Xiaotian Yu Hongzhong Zhang Xuan Xu Xiaojun Chen Lequn Qiu Zhi Chen Tianyao Li Yunqi Ke Songyu Zhao Xueyuan Huang Yuxiang Liu Zhijian Xu Shichao Wan Cheng Qiu Wei Zhou Yuhao Huang Junxiang Zhu Qiuming Xu Bowen Liu Haoming Pu Yifei Lu Yizhou You Yurong Tang Shuyang Zhang Jiaheng 1. Sort the first half
Bai Yiwei Xue Zhendong Cai Wanxin Gao Bicheng Li Huichen Sun Xingyuan Li Yunqi Yang Runzhe Liu Haoming You Xiaotian Liu Zhijian Zhang Xuan Lu Yizhou Chen Lequn Qiu Zhi Chen Tianyao Tang Shuyang Wan Ke Songyu Cheng Huang Yuxiang Xie Tiancheng Xu Shichao Xu Xiaojun Qiu Wei Ye Zihao Huang Junxiang Yu Hongzhong Xu Bowen Zhao Xueyuan Pu Yifei Zhou Yuhao You Yurong Zhu Qiuming Zhang Jiaheng 1. Sort the first half
Bai Yiwei Xue Zhendong Cai Wanxin Gao Bicheng Li Huichen Sun Xingyuan Li Yunqi Yang Runzhe Liu Haoming You Xiaotian Liu Zhijian Zhang Xuan Lu Yizhou Chen Lequn Qiu Zhi Chen Tianyao Tang Shuyang Wan Ke Songyu Cheng Huang Yuxiang Xie Tiancheng Xu Shichao Xu Xiaojun Qiu Wei Ye Zihao Huang Junxiang Yu Hongzhong Xu Bowen Zhao Xueyuan Pu Yifei Zhou Yuhao You Yurong Zhu Qiuming Zhang Jiaheng 1. Sort the first half 2. Sort the second half
Bai Yiwei Chen Lequn Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half
Bai Yiwei Chen Lequn Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Cai Wanxin Chen Tianyao Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Cai Wanxin Chen Tianyao Chen Lequn Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Cai Wanxin Chen Tianyao Chen Lequn Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Cai Wanxin Chen Tianyao Chen Lequn Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Cai Wanxin Chen Tianyao Chen Lequn Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Bai Yiwei Chen Lequn Bai Yiwei Cai Wanxin Cai Wanxin Chen Tianyao Chen Lequn Li Huichen Gao Bicheng Li Yunqi Huang Junxiang Liu Haoming Huang Yuxiang Liu Zhijian Ke Songyu Lu Yizhou Pu Yifei Qiu Zhi Qiu Wei Tang Shuyang Wan Sun Xingyuan Cheng Xu Bowen Xie Tiancheng Xu Shichao How do we sort the two halves? Xu Xiaojun Xue Zhendong Ye Zihao Yang Runzhe Yu Hongzhong You Xiaotian Zhao Xueyuan You Yurong Zhou Yuhao Zhang Jiaheng Zhu Qiuming Zhang Xuan 1. Sort the first half 2. Sort the second half 3. Merge the sorted arrays.
Merge sort
Merge sort Y, L, X, B, C, Q, Z, T
Merge sort Y, L, X, B, C, Q, Z, T
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B Y L
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B Y L L,Y
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B Y L X B L,Y
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B Y L X B L,Y B,X
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B Y L X B L,Y B,X B, L, X, Y
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B Y L X B L,Y B,X B, L, X, Y
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B C, Q Z, T Y L X B L,Y B,X B, L, X, Y
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B C, Q Z, T Y L X B C Q L,Y B,X B, L, X, Y
Merge sort Y, L, X, B, C, Q, Z, T Y, L, X, B C, Q, Z, T Y, L X, B C, Q Z, T Y L X B C Q L,Y B,X C,Q B, L, X, Y
Recommend
More recommend