SlideShare una empresa de Scribd logo
1 de 156
Descargar para leer sin conexión
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.

Más contenido relacionado

Destacado

[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
 

Destacado (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
 

Similar a [ACM-ICPC] Sort

Practice b 2 step equations
Practice b 2 step equationsPractice b 2 step equations
Practice b 2 step equationsmsj1998
 
Sorting of arrays, types in c++ .IST .ppt
Sorting of arrays, types in c++ .IST .pptSorting of arrays, types in c++ .IST .ppt
Sorting of arrays, types in c++ .IST .pptsaadpisjes
 
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
 
Powerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายPowerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายevaluation47
 

Similar a [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
 
Sorting of arrays, types in c++ .IST .ppt
Sorting of arrays, types in c++ .IST .pptSorting of arrays, types in c++ .IST .ppt
Sorting of arrays, types in c++ .IST .ppt
 
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 年“专升本”考试大纲目录
 
Powerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยายPowerpoint ประกอบการบรรยาย
Powerpoint ประกอบการบรรยาย
 
UB0203
UB0203UB0203
UB0203
 
UB0203
UB0203UB0203
UB0203
 

Más 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
 

Más 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
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Último (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 

[ACM-ICPC] Sort