SlideShare une entreprise Scribd logo
1  sur  156
Télécharger pour lire hors ligne
Sort
 郭至軒(KuoE0)
KuoE0.tw@gmail.com
     KuoE0.ch
Attribution-ShareAlike 3.0 Unported
           (CC BY-SA 3.0)

  http://creativecommons.org/licenses/by-sa/3.0/

              Latest update: Feb 27, 2013
Bubble Sort
   氣泡排序法
Algorithm
1. 從第一個元素開始比較每一對相鄰元素

2. 若第一個元素大於第二個元素則交換

3. 每次遞減需要比較的元素對直到不需比
 較
Origin

10   2     7      9   1




10   2     7      9   1
1 st   Iteration



10     2      7   9     1
1 st   Iteration



10     2      7   9     1
1 st   Iteration



2
10    2
      10      7   9     1
1 st   Iteration



2
10    2
      10      7   9     1
1 st   Iteration



2
10     2
       7      7
              10   9    1
1 st   Iteration



2
10     2
       7      7
              10   9    1
1 st   Iteration



2
10     2
       7      7
              9   9
                  10    1
1 st   Iteration



2
10     2
       7      7
              9   9
                  10    1
1 st   Iteration



2
10     2
       7      7
              9   1
                  9     1
                        10
1 st   Iteration

2      7      9   1     10




2
10     2
       7      7
              9   1
                  9     1
                        10
2 nd   Iteration



2     7      9   1     10
2 nd   Iteration



2     7      9   1     10
2 nd   Iteration



2     7      9   1     10
2 nd   Iteration



2     7      9   1     10
2 nd   Iteration



2     7      9   1     10
2 nd   Iteration



2     7      9   1     10
2 nd   Iteration



2     7      1
             9   1
                 9     10
2 nd   Iteration

2     7      1   9     10




2     7      1
             9   1
                 9     10
3 rd   Iteration



2     7      1   9     10
3 rd   Iteration



2     7      1   9     10
3 rd   Iteration



2     7      1   9     10
3 rd   Iteration



2     7      1   9     10
3 rd   Iteration



2     1
      7      1
             7   9     10
3 rd   Iteration

2     1      7   9     10




2     1
      7      1
             7   9     10
4 th   Iteration



2     1      7   9     10
4 th   Iteration



2     1      7   9     10
4 th   Iteration



1
2     1
      2      7   9     10
4 th   Iteration

1     2      7   9     10




1
2     1
      2      7   9     10
Result

1   2     7      9   10




1   2     7      9   10
Source Code
for ( int i = 0; i < n; ++i )
 for ( int j = 0; j < n - 1 - i; ++j )
   if ( A[ j ] > A[ j + 1 ] )
    swap( A[ j ], A[ j + 1 ] );
Time Complexity
for ( int i = 0; i < n; ++i )
 for ( int j = 0; j < n - 1 - i; ++j )
   if ( A[ j ] > A[ j + 1 ] )
    swap( A[ j ], A[ j + 1 ] );



                     最大循環次數略估
    第 1 層迴圈              n
    第 2 層迴圈              n
n×n=         n 2

Time Complexity: O(n2)
從範例中可發現...
耗費許多時間檢查有序數對
Merge Sort
  合併排序法
Algorithm

採用 divide & conquer 策略
Divide

將當前數列對半切割遞迴進行
  直到   剩一個元素
2   9       4   3       8       7       5       1       6



                2   9   4       3   8                   7       5       1       6



        2       9   4           3   8               7       5               1       6



    2       9       4       3           8       7               5       1               6



2               9
Conquer
1. 利用兩個指標指向兩個有序數列 A 與 B
2. 比較指標指向的數值
3. 將較小的數值放入新的數列 C,並將該指標
 指向下一數值
4. 直到某一指標指向數列結尾,將另一數列剩
 餘的數值放都入數列 C
Merge Two Sequence

2   3   4   8   9   1   5   6   7
Merge Two Sequence

2   3   4   8   9   5   6   7



    1
Merge Two Sequence

  3   4   8   9   5   6   7



 1    2
Merge Two Sequence

     4   8   9   5   6   7



 1   2   3
Merge Two Sequence

         8   9   5   6   7



 1   2   3   4
Merge Two Sequence

         8   9       6   7



 1   2   3   4   5
Merge Two Sequence

         8   9           7



 1   2   3   4   5   6
Merge Two Sequence

         8   9



 1   2   3   4   5   6   7
Merge Two Sequence

             9



 1   2   3   4   5   6   7   8
Merge Two Sequence



 1   2   3   4   5   6   7   8   9
1   2       3   4       5       6       7       8       9



                2   3   4       8   9                   1       5       6       7



        2       4   9           3   8               5       7               1       6



    2       9       4       3           8       7               5       1               6



2               9
Source Code
int mergeSort( int L, int R )   {
  if ( R - L == 1 )
    return;
  int mid = ( R + L ) / 2, C[   R - L ];
  mergeSort( L, mid );
  mergeSort( mid, R );
  for ( int p1 = L, p2 = mid,   p = 0; p < R - L; ++p ) {
    if ( ( p1 != mid && A[ p1   ] < A[ p2 ] ) || p2 == R )
      C[ p ] = A[ p1++ ];
    else
      C[ p ] = A[ p2++ ];
  }
  for ( int i = L; i < R; ++i   )
    A[ i ] = C[ i - L ];
}
Time Complexity
              total time
Time Complexity
              total time

                   n

              2 * (n/2) = n

                   ...

              n * (n/n) = n
Best height




              }
              log2n
Time Complexity: O(nlog2n)
Quick Sort
  快速排序法
Algorithm

採用 divide & conquer 策略
Divide
從數列中挑出一個元素作為 pivot,利
用 pivot 將原數列分為兩個子數列:
• 所有元素小於 pivot 的數列 A
• 所有元素大於 pivot 的元素的數列 B
• 等於 pivot 的元素可放置在任一個中
2   9   4   3   8   7   5   1   6
2   9   4   3   8   7   5   1   6
2       9       4       3       8       7   5   1       6



2       4       3       5       1       6               9       8
2       9       4       3       8       7   5   1       6



2       4       3       5       1       6               9       8
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6



    2
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6



    2
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6



    2                           5       6
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6



    2                           5       6
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6



    2                           5       6



                                    5
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6



    2                           5       6



                                    5
2       9       4       3       8       7   5   1       6



    2       4       3       5       1       6               9       8



2       1                   4       5       6                   9



    2                           5       6



                                    5
Conquer
由於子數列已被 pivot 分為兩段,一段
小於等於 pivot 的數列 A,另一段大於
等於 pivot 的數列 B。
Conquer
由於子數列已被 pivot 分為兩段,一段
小於等於 pivot 的數列 A,另一段大於
等於 pivot 的數列 B。

     A       C     B
2
1



    2
1       2



    2
1       2



    2           6



            5
1       2



    2       5       6



                5
1       2   4



    2           5       6



                    5
1       2   4       5       6



    2           5       6



                    5
3



1       2       4       5       6



    2               5       6



                        5
1       2   3   4       5       6



1       2           4       5       6



    2                   5       6



                            5
1       2   3   4       5       6   8



1       2           4       5       6       9



    2                   5       6



                            5
1       2   3   4       5       6   8       9



1       2           4       5       6       9



    2                   5       6



                            5
7



    1       2   3   4       5       6       8       9



1       2           4       5       6           9



    2                   5       6



                            5
1       2       3       4       5       6   7   8       9



    1       2       3       4       5       6               8       9



1       2                   4       5       6                   9



    2                           5       6



                                    5
1       2       3       4       5       6   7   8       9



    1       2       3       4       5       6               8       9



1       2                   4       5       6                   9



    2                           5       6



                                    5
Source Code
void quickSort( int L, int R ) {
	   if ( R - L <= 1 )
	   	   return;
	   int pivot = N[ L ], p1 = L + 1, p2 = R - 1;
	   do {
	   	   while ( N[ p1++ ] <= pivot )
	   	   	   ;
	   	   while ( N[ p2-- ] > pivot )
	   	   	   ;
	   	   if ( p1 < p2 )
	   	   	   swap( N[ p1 ], N[ p2 ] );
	   } while ( p1 < p2 );
	   quickSort( L + 1, p1 );
	   quickSort( p1, R );
	   for ( int i = L + 1; i < p1; ++i )
	   	   swap( N[ i - 1 ], N[ i ] );
}
How to Divide

4   1   9   7   5   8   2   3   6
How to Divide

4   1   9   7   5   8   2   3   6
How to Divide

4   1   9   7   5   8   2   3   6
How to Divide

4   1   9   7   5   8   2   3   6
How to Divide

4   1   3   7   5   8   2   9   6
How to Divide

4   1   3   7   5   8   2   9   6
How to Divide

4   1   3   7   5   8   2   9   6
How to Divide

4   1   3   2   5   8   7   9   6
How to Divide

4   1   3   2   5   8   7   9   6
How to Divide

4   1   3   2   5   8   7   9   6
How to Divide

4   1   3   2   5   8   7   9   6




4   1   3   2   5   8   7   9   6
How to Conquer


4   1   2   3   5   6   7   8   9
How to Conquer


1   4   2   3   5   6   7   8   9
How to Conquer


1   2   4   3   5   6   7   8   9
How to Conquer


1   2   3   4   5   6   7   8   9
In-place Version
void quickSort( int L, int R ) {
	 if ( R - L <= 1 )
	 	 return;
	 int pivot = N[ R - 1 ], p = L;
	 for ( int i = L; i < R - 1; ++i ) {
	 	 if ( N[ i ] <= pivot ) {
	 	 	 swap( N[ i ], N[ p ] );
	 	 	 ++p;
	 	 }
	 }
	 swap( N[ R - 1 ], N[ p ] );
	 quickSort( L, p );
	 quickSort( p + 1, R );
}
How to Divide

2   9   4   3   8   7   5   1   6
How to Divide

2   9   4   3   8   7   5   1   6
How to Divide

2   9   4   3   8   7   5   1   6
How to Divide

2   9   4   3   8   7   5   1   6
How to Divide

2   9   4   3   8   7   5   1   6
How to Divide

2   9   4   3   8   7   5   1   6
How to Divide

2   9   4   3   8   7   5   1   6
How to Divide

2   4
    9   9
        4   3   8   7   5   1   6
How to Divide

2   4
    9   9
        4   3   8   7   5   1   6
How to Divide

2   4
    9   9
        4   3   8   7   5   1   6
How to Divide

2   4
    9   3
        4   9
            3   8   7   5   1   6
How to Divide

2   4
    9   3
        4   9
            3   8   7   5   1   6
How to Divide

2   4
    9   3
        4   9
            3   8   7   5   1   6
How to Divide

2   4
    9   3
        4   9
            3   8   7   5   1   6
How to Divide

2   4
    9   3
        4   9
            3   8   7   5   1   6
How to Divide

2   4
    9   3
        4   9
            3   8   7   5   1   6
How to Divide

2   4
    9   3
        4   9
            3   8   7   5   1   6
How to Divide

2   4
    9   3
        4   5
            3   8   7   9
                        5   1   6
How to Divide

2   4
    9   3
        4   5
            3   8   7   9
                        5   1   6
How to Divide

2   4
    9   3
        4   5
            3   8   7   9
                        5   1   6
How to Divide

2   4
    9   3
        4   5
            3   8
                1   7   9
                        5   8
                            1   6
How to Divide

2   4
    9   3
        4   5
            3   1
                8   7   9
                        5   8
                            1   6
How to Divide

2   4
    9   3
        4   5
            3   1
                8   6
                    7   9
                        5   8
                            1   7
                                6
How to Divide

2   4
    9   3
        4   5
            3   1
                8   6
                    7   9
                        5   8
                            1   7
                                6




2   4   3   5   1       9   8   7
How to Conquer


                    6




1   2   3   4   5       7   8   9
How to Conquer


1   2   3   4   5   6   7   8   9




1   2   3   4   5       7   8   9
Time Complexity
              total time
Time Complexity
              total time

                   n

              2 * (n/2) = n

                   ...

              n * (n/n) = n
Best height




              }
              log2n
Worst height




               }
               n
Time Complexity:
 O(nlog2n) ~ O(n 2)
Average Time Complexity:
        O(nlog2n)
Builtin Function
  如果你純粹想要排序罷了...
qsort (C/C++)
   • include <stdlib.h> or <cstdlib>
   • compare function
void qsort (void* base, size_t num, size_t
size, int (*compar)(const void*,const void*));
void qsort (void* base, size_t num, size_t
size, int (*compar)(const void*,const void*));




    base: 指向欲排序列表起始位置之指標
    num: 欲排序的元素數量
    size: 各元素大小
    compar: 比較函式的函式指標
Compare Function
              Function prototype:
int function_name(const void* p1, const void* p2);


           return value      means
            less than 0      p1 < p2
             equal to 0      p1 == p2
           greater than 0    p1 > p2
Example
int cmp( const void* p1, const void* p2 ) {
  return *(int*)p1 - *(int*)p2;
}

int main() {
  int n, N[ 10010 ];
  while ( scanf( “%d”, &n ) != EOF ) {
    int x;
    for ( int i = 0; i < n; ++i ) {
      scanf( “%d”, &x );
      N[ i ] = x;
    }

      qsort( N, n, sizeof( int ), cmp );
    }
    return 0;
}
sort (STL)
   • include <algorithm>
   • compare function for customized
      behavior
template <class RandomAccessIterator>
void sort (RandomAccessIterator first,
RandomAccessIterator last);

template <class RandomAccessIterator, class Compare>
void sort (RandomAccessIterator first,
RandomAccessIterator last, Compare comp);
Sort by operator <
template <class RandomAccessIterator>
void sort (RandomAccessIterator first,
RandomAccessIterator last);



     first: 指向欲排序列表起始位置之 iterator
     last: 指向欲排序列表結尾位置之 iterator
             指標可被轉型為 iterator!
依照該資料型別的小於運算子 (<) 作為排序依據!
Customized Data Type
   Function prototype for operator <:
bool operator< ( const type_name &p ) const;


        return value      means

           TRUE           this < p

           FALSE          this >= p
Example (builtin type)
int main() {
  int n, N[ 10010 ];
  while ( scanf( “%d”, &n ) != EOF ) {
    int x;
    for ( int i = 0; i < n; ++i ) {
      scanf( “%d”, &x );
      N[ i ] = x;
    }
    sort( N, N + n );
  }
  return 0;
}
Example (custom type)
struct T {
   int x, y;
   bool operator< ( const T &p ) const {
     return x == p.x ? x < p.x : y < p.y;
   }
};
T pt[ 10010 ];
int main() {
   int n;
   while ( scanf( “%d”, &n ) != EOF ) {
     int x, y;
     for ( int i = 0; i < n; ++i ) {
       scanf( “%d %d”, &x, &y );
       pt[ i ].x = x, pt[ i ].y = y;
     }
     sort( pt, pt + n );
   }
   return 0;
}
Sort by Compare Function
template <class RandomAccessIterator, class Compare>
void sort (RandomAccessIterator first,
RandomAccessIterator last, Compare comp);



     first: 指向欲排序列表起始位置之 iterator
     last: 指向欲排序列表結尾位置之 iterator
     comp: 比較函式

            指標可被轉型為 iterator!
Customized Data Type
               Function prototyp:
bool function_name ( type_name p1, type_name p2 );


           return value      means

              TRUE           p1 < p2

              FALSE          p1 >= p2
Example (descending)
bool descending( int p1, int p2 ) {
  return p1 >= p2;
}

int main() {
  int n, N[ 10010 ];
  while ( scanf( “%d”, &n ) != EOF ) {
    int x;
    for ( int i = 0; i < n; ++i ) {
      scanf( “%d”, &x );
      N[ i ] = x;
    }
    sort( N, N + n, descending );
  }
  return 0;
}
Reference
• 冒泡排序 - 維基百科,自由的百科全書
• 歸併排序 - 維基百科,自由的百科全書
• 快速排序 - 維基百科,自由的百科全書
• qsort - C++ Reference
• sort - C++ Reference
Practice Now
10810 - Ultra-QuickSort
Thank You for Your
    Listening.

Contenu connexe

En vedette

[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-upChih-Hsuan Kuo
 
[ACM-ICPC] 0 - ACM-ICPC
[ACM-ICPC] 0 - ACM-ICPC[ACM-ICPC] 0 - ACM-ICPC
[ACM-ICPC] 0 - ACM-ICPCChih-Hsuan Kuo
 
[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum CutChih-Hsuan Kuo
 
Ownership System in Rust
Ownership System in RustOwnership System in Rust
Ownership System in RustChih-Hsuan Kuo
 
[ACM-ICPC] Bipartite Matching
[ACM-ICPC] Bipartite Matching[ACM-ICPC] Bipartite Matching
[ACM-ICPC] Bipartite MatchingChih-Hsuan Kuo
 
[ACM-ICPC] Dinic's Algorithm
[ACM-ICPC] Dinic's Algorithm[ACM-ICPC] Dinic's Algorithm
[ACM-ICPC] Dinic's AlgorithmChih-Hsuan Kuo
 

En vedette (6)

[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up[ACM-ICPC] Top-down & Bottom-up
[ACM-ICPC] Top-down & Bottom-up
 
[ACM-ICPC] 0 - ACM-ICPC
[ACM-ICPC] 0 - ACM-ICPC[ACM-ICPC] 0 - ACM-ICPC
[ACM-ICPC] 0 - ACM-ICPC
 
[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut[ACM-ICPC] Minimum Cut
[ACM-ICPC] Minimum Cut
 
Ownership System in Rust
Ownership System in RustOwnership System in Rust
Ownership System in Rust
 
[ACM-ICPC] Bipartite Matching
[ACM-ICPC] Bipartite Matching[ACM-ICPC] Bipartite Matching
[ACM-ICPC] Bipartite Matching
 
[ACM-ICPC] Dinic's Algorithm
[ACM-ICPC] Dinic's Algorithm[ACM-ICPC] Dinic's Algorithm
[ACM-ICPC] Dinic's Algorithm
 

Similaire à [ACM-ICPC] Sort

Practice b 2 step equations
Practice b 2 step equationsPractice b 2 step equations
Practice b 2 step equationsmsj1998
 
Reflection Of Light Answersheet BY ANURAG TYAGI CLASSES (ATC)
Reflection Of Light Answersheet BY ANURAG TYAGI CLASSES (ATC)Reflection Of Light Answersheet BY ANURAG TYAGI CLASSES (ATC)
Reflection Of Light Answersheet BY ANURAG TYAGI CLASSES (ATC)ANURAG TYAGI CLASSES (ATC)
 
iGridd puzzles, Demo book
iGridd puzzles, Demo bookiGridd puzzles, Demo book
iGridd puzzles, Demo bookRastislav Rehak
 
Sudoku Solving with Computational Intelligence
Sudoku Solving with Computational IntelligenceSudoku Solving with Computational Intelligence
Sudoku Solving with Computational Intelligenceharaldhiss
 
Bubble Sort Python
Bubble Sort PythonBubble Sort Python
Bubble Sort PythonValneyFilho1
 
Day 3 subtracting integers
Day 3 subtracting integersDay 3 subtracting integers
Day 3 subtracting integersErik Tjersland
 
Sorting techniques Anil Dutt
Sorting techniques Anil DuttSorting techniques Anil Dutt
Sorting techniques Anil DuttAnil Dutt
 
Interpretation Of 4-3-3 | Rotational Movement
Interpretation Of 4-3-3 | Rotational MovementInterpretation Of 4-3-3 | Rotational Movement
Interpretation Of 4-3-3 | Rotational MovementMichael Jolley
 
江西财经大学2010 年“专升本”考试大纲目录
江西财经大学2010 年“专升本”考试大纲目录江西财经大学2010 年“专升本”考试大纲目录
江西财经大学2010 年“专升本”考试大纲目录sugeladi
 
Parallel Prime Number Generation Using The Sieve of Eratosthenes
Parallel Prime Number Generation Using The Sieve of EratosthenesParallel Prime Number Generation Using The Sieve of Eratosthenes
Parallel Prime Number Generation Using The Sieve of EratosthenesAdrian-Tudor Panescu
 
Powerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายPowerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายevaluation47
 

Similaire à [ACM-ICPC] Sort (20)

Sudoku no. 1
Sudoku no. 1Sudoku no. 1
Sudoku no. 1
 
Practice b 2 step equations
Practice b 2 step equationsPractice b 2 step equations
Practice b 2 step equations
 
Sudoku
SudokuSudoku
Sudoku
 
Reflection Of Light Answersheet BY ANURAG TYAGI CLASSES (ATC)
Reflection Of Light Answersheet BY ANURAG TYAGI CLASSES (ATC)Reflection Of Light Answersheet BY ANURAG TYAGI CLASSES (ATC)
Reflection Of Light Answersheet BY ANURAG TYAGI CLASSES (ATC)
 
iGridd puzzles, Demo book
iGridd puzzles, Demo bookiGridd puzzles, Demo book
iGridd puzzles, Demo book
 
Saes tables
Saes tablesSaes tables
Saes tables
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Sudoku Solving with Computational Intelligence
Sudoku Solving with Computational IntelligenceSudoku Solving with Computational Intelligence
Sudoku Solving with Computational Intelligence
 
cs1311lecture16wdl.ppt
cs1311lecture16wdl.pptcs1311lecture16wdl.ppt
cs1311lecture16wdl.ppt
 
Bubble Sort Python
Bubble Sort PythonBubble Sort Python
Bubble Sort Python
 
Bubble Sort.ppt
Bubble Sort.pptBubble Sort.ppt
Bubble Sort.ppt
 
1150 day 8
1150 day 81150 day 8
1150 day 8
 
Day 3 subtracting integers
Day 3 subtracting integersDay 3 subtracting integers
Day 3 subtracting integers
 
Sorting techniques Anil Dutt
Sorting techniques Anil DuttSorting techniques Anil Dutt
Sorting techniques Anil Dutt
 
Interpretation Of 4-3-3 | Rotational Movement
Interpretation Of 4-3-3 | Rotational MovementInterpretation Of 4-3-3 | Rotational Movement
Interpretation Of 4-3-3 | Rotational Movement
 
江西财经大学2010 年“专升本”考试大纲目录
江西财经大学2010 年“专升本”考试大纲目录江西财经大学2010 年“专升本”考试大纲目录
江西财经大学2010 年“专升本”考试大纲目录
 
Parallel Prime Number Generation Using The Sieve of Eratosthenes
Parallel Prime Number Generation Using The Sieve of EratosthenesParallel Prime Number Generation Using The Sieve of Eratosthenes
Parallel Prime Number Generation Using The Sieve of Eratosthenes
 
Powerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายPowerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยาย
 
UB0203
UB0203UB0203
UB0203
 
UB0203
UB0203UB0203
UB0203
 

Plus de Chih-Hsuan Kuo

[Mozilla] content-select
[Mozilla] content-select[Mozilla] content-select
[Mozilla] content-selectChih-Hsuan Kuo
 
在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。Chih-Hsuan Kuo
 
Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Chih-Hsuan Kuo
 
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoUse C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoChih-Hsuan Kuo
 
Pocket Authentication with OAuth on Firefox OS
Pocket Authentication with OAuth on Firefox OSPocket Authentication with OAuth on Firefox OS
Pocket Authentication with OAuth on Firefox OSChih-Hsuan Kuo
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in GeckoChih-Hsuan Kuo
 
面試面試面試,因為很重要所以要說三次!
面試面試面試,因為很重要所以要說三次!面試面試面試,因為很重要所以要說三次!
面試面試面試,因為很重要所以要說三次!Chih-Hsuan Kuo
 
Windows 真的不好用...
Windows 真的不好用...Windows 真的不好用...
Windows 真的不好用...Chih-Hsuan Kuo
 
[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree IsomorphismChih-Hsuan Kuo
 
[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint Set[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint SetChih-Hsuan Kuo
 
[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree IsomorphismChih-Hsuan Kuo
 

Plus de Chih-Hsuan Kuo (20)

Rust
RustRust
Rust
 
[Mozilla] content-select
[Mozilla] content-select[Mozilla] content-select
[Mozilla] content-select
 
在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。在開始工作以前,我以為我會寫扣。
在開始工作以前,我以為我會寫扣。
 
Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36Effective Modern C++ - Item 35 & 36
Effective Modern C++ - Item 35 & 36
 
Use C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in GeckoUse C++ to Manipulate mozSettings in Gecko
Use C++ to Manipulate mozSettings in Gecko
 
Pocket Authentication with OAuth on Firefox OS
Pocket Authentication with OAuth on Firefox OSPocket Authentication with OAuth on Firefox OS
Pocket Authentication with OAuth on Firefox OS
 
Necko walkthrough
Necko walkthroughNecko walkthrough
Necko walkthrough
 
Protocol handler in Gecko
Protocol handler in GeckoProtocol handler in Gecko
Protocol handler in Gecko
 
面試面試面試,因為很重要所以要說三次!
面試面試面試,因為很重要所以要說三次!面試面試面試,因為很重要所以要說三次!
面試面試面試,因為很重要所以要說三次!
 
應徵軟體工程師
應徵軟體工程師應徵軟體工程師
應徵軟體工程師
 
面試心得分享
面試心得分享面試心得分享
面試心得分享
 
Windows 真的不好用...
Windows 真的不好用...Windows 真的不好用...
Windows 真的不好用...
 
Python @Wheel Lab
Python @Wheel LabPython @Wheel Lab
Python @Wheel Lab
 
Introduction to VP8
Introduction to VP8Introduction to VP8
Introduction to VP8
 
Python @NCKU CSIE
Python @NCKU CSIEPython @NCKU CSIE
Python @NCKU CSIE
 
[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism
 
[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint Set[ACM-ICPC] Disjoint Set
[ACM-ICPC] Disjoint Set
 
[ACM-ICPC] UVa-10245
[ACM-ICPC] UVa-10245[ACM-ICPC] UVa-10245
[ACM-ICPC] UVa-10245
 
[ACM-ICPC] About I/O
[ACM-ICPC] About I/O[ACM-ICPC] About I/O
[ACM-ICPC] About I/O
 
[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism[ACM-ICPC] Tree Isomorphism
[ACM-ICPC] Tree Isomorphism
 

Dernier

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 

Dernier (20)

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 

[ACM-ICPC] Sort