Notice
Recent Posts
Recent Comments
목록2017/05/07 (2)
:: ADVANCE ::
가장 긴 증가하는 부분수열
가장 긴 증가하는 부분수열 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455#include #define N 6 int number[N] = { 10, 20, 10, 30, 40, 50 };int count[N];int index[N]; void init(){ for (int i = 0; i
Algorithm/Algorithm
2017. 5. 7. 03:14
[순열과 조합] 순열과 조합 알고리즘
순열 Permutation 12345678910111213141516171819202122232425262728293031323334353637383940414243#include #define N 4#define R 3 int number[10]; int data[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }; void swap(int *first, int *second) { int temp = *first; *first = *second; *second = temp;} void print(int n){ for (int i = n - 1; i >= 0; i--) { printf("%d ", number[i]); } printf("\n");} void permutation(int ..
Algorithm/Algorithm
2017. 5. 7. 02:51