블로그
-
자료구조 덱 프로그램
#include #include #include #define TRUE 1 #define FALSE 0 typedef int element; typedef struct DlistNode DlistNode *tail; }DequeType; void error(const char *message) { fprintf(stderr, "%s", message); exit(1)
blog.naver.com · 2018.08.18
-
프로그래머스 LEVEL.2 다음 큰 숫자
조건 1. n의 다음 큰 숫자는 n보다 큰 자연수 입니다. 조건 2. n의 다음 큰 숫자와 n은 2진수로 변환했을 때 1의 갯수가 같습니다. 자연수 n이 매개변수로 주어질 때, n의 다음 큰 숫자를 return 하는 solution 함수를 완성해주세요.
blog.naver.com · 2018.09.18
-
c언어 자료구조 스택을 이용한 괄호 검사
#include #include #include #define MAX_STACK_SIZE 100 #define FALSE 0 #define TRUE 1 typedef char element } int is_empty(StackType *s) { return (s->top == -1); } int is_full(StackType *s) { return s->
blog.naver.com · 2018.08.05
-
[알고리즘문제풀기] Level 1. 같은 숫자는 싫어(java)
합니다. * 예를들면 * arr = [1, 1, 3, 3, 0, 1, 1] 이면 [1, 3, 0, 1] 을 return 합니다. * arr = [4, 4, 4, 3, 3] 이면 [ 4, 3] 을 return 합니다. * 배열 arr에서 연속적으로 나타나는 숫자는 제거하고 남은 수들을 return 하는 solution 함수를 완성해 주세요. * 제한사......
blog.naver.com · 2018.05.25
-
[js] 정렬 function sort()
var list = [1, 17, 24, 2]; 를 정렬하기 위해 list.sort()를 사용하면 list = [1,17,2,24]; 가 됩니다. } if(a is greater than b by some ordering criterion){retunr 1;} return 0; } 음수일.......
blog.naver.com · 2018.01.31
-
1월23일 NHL분석 토론토 메이플 리프스 vs 콜로라도 애벌랜치
- 7:00 PM Star Rating:8.0 Reason For Pick: We won with Toronto on Saturday as it defeated Ottawa 4-0 where they are now 13-7-1 which i.......
blog.naver.com · 2018.01.22
-
[영진전문대학 2-CP-B 컴퓨터정보계열] 22장 programming 2번
소스코드 class MyMath { double v=0.0; public double getAverage(T[] a){ for (int i = 0; i < a.length; i [] args) { Integer[] list = { 1, 2, 3, 4, 5, 6 }; Double[] list2 = {3.2, 4.5, 3.4, 2.8, 3.8}; MyMath
blog.naver.com · 2017.11.05
-
8월20일 몽펠리에 HSC VS RC 스트라스부르 분석 MONTPELLIER – STRASBOURG PREDICTION (19.08.2017)
The win came home on the first day against Caen with a score of 1-0. The defeat, on the last day at home in Toulouse, always with the result of 1-0.
blog.naver.com · 2017.08.19
-
[Python]Battle_Ship_START
print_board(board) def random_row(board): return randint(0, len(board) - 1) def random_col(board): return randint(0, len(board[0]) - 1) ship_row = random_row(board) ship_col = random_col(board) print ("Answer
blog.naver.com · 2017.05.22
-
기출문제 2015년 풀이
for (i = 1; i int main() { int i, j, n; scanf("%d", &n); for (i = 0;i int main() { int x,n; scanf_s ("%d %d", &x, &n); x = x << n; printf("%d", x); return 0; } 답
blog.naver.com · 2017.04.23