K

@kimjuha19

대기열 관리 시스템

C
1 week ago
#include <stdio.h> int front = 0; int rear = 0; int que[100]; void enque(int x){ que[rear++] = x; }

특정 데이터 위치 찾기

C
1 week ago
#include <stdio.h> int front = 0; int rear = 0; int que[1000]; void enque(int x){ que[rear++] = x; }

큐의 기본 연산 구현하기

C
1 week ago
#include <stdio.h> int front = 0; int rear = 0; int que[100] = {}; void enque(int x){ que[rear++] = x; }

성적 처리 및 다중 조건 정렬

Python
1 week ago
students = [ ["Kim", 80, 90, 100], ["Lee", 80, 90, 100], ["Park", 90, 90, 100] ] students.sort(key=lambda x: (-(x[1] + x[2] + x[3]), -x[1], -x[2], x[0])) answer = [students[0][0],students[1][0],students[2][0]] print(answer)

주식 매매 최고 타이밍

Python
1 week ago
prices = [7, 1, 5, 3, 6, 4] answer = 0 idx = 0 min_price = 100 for i in range(len(prices)): if prices[i] < min_price: min_price = prices[i] elif prices[i] - min_price > answer: answer = prices[i] - min_price

자판기 거스름돈 계산

Python
1 week ago
change = 650 coin_stock = [1, 2, 5, 5] have_pay = coin_stock[0] * 500 + coin_stock[1] * 100 + coin_stock[2] * 50 + coin_stock[3] * 10 coin_values = [500, 100, 50, 10] answer = [0, 0, 0, 0] for i in range(4): coin = coin_values[i] stock = c

주소값을 받아 처리하는 입차 시스템

C
1 week ago
#include <stdio.h> int parking_queue[10]; int rear = 0; void parking_enqueue(int* rear, int car_number) { parking_queue[(*rear)++] = car_number; } int main() {

코리 코딩 학원의 학생 대기 명단

C
1 week ago
#include <stdio.h> typedef struct { char name[20]; int age; } Student; int main() { Student academy_queue[10]; int rear = 0;

마트 계산대 줄 서기

C
1 week ago
#include <stdio.h> int main() { char* mart_queue[5]; int front = 0; int rear = 0; mart_queue[rear++] = "민수";

은행 창구의 호출 시스템

C
1 week ago
#include <stdio.h> int main() { char* bank_queue[5] = {"철수", "영희", "지아", "", ""}; int front = 0; int rear = 3; printf("%s\n", bank_queue[front++]); printf("front = %d\n",front);

공유기 설치

Python
1 week ago
houses = [1, 2, 8, 4, 9] c = 3 houses.sort() left = 1 right = houses[-1] - houses[0] answer = 0 while left <= right:

회전된 정렬 배열에서 최솟값 찾기

Python
1 week ago
nums = [4, 5, 6, 7, 0, 1, 2] target = 10 left = 0 right = len(nums) answer = -1 left, right = 0, len(nums) - 1 while left < right:

정렬된 배열에서 타겟 범위 찾기

Python
1 week ago
nums = [5, 7, 7, 8, 8, 10] target = 8 left = 0 right = len(nums) start_answer = -1 while left <= right: mid = (left+right) // 2

구조체 배열의 다중 조건 정렬

C
3 weeks ago
#include <stdio.h> typedef struct { char name[20]; int gold; int silver; int bronze; } Country; void sort_countries(Country arr[], int size) {

중첩 구조체(Nested Structure) 기반 3차원 공간 도형 연산

C
3 weeks ago
#include <stdio.h> typedef struct { int x, y, z; } Point3D; typedef struct { Point3D min_point; Point3D max_point; } Box3D;

텍스트 기반 '미니 데이터베이스' 검색 시스템

C
1 month ago
#include <stdio.h> #include <string.h> typedef struct{ int isbn; char title[100]; char author[50]; int isBorrowed; }Book;

메모리 정렬 및 크기 최적화 분석

C
1 month ago
#include <stdio.h> typedef struct{ char a; int b; char c; }Student1; typedef struct{ char a;

삽입정렬

C
1 month ago
#include <stdio.h> int main() { int arr[5] = {7, 4, 2, 3, 1}; for (int i = 1; i < 5; i++) { int k = arr[i]; int j = i - 1; while (j >= 0 && k < arr[j]) { arr[j + 1] = arr[j]; j--;

구조체 정렬 및 데이터 무결성 검사(선택)

C
1 month ago
#include <stdio.h> typedef struct { int num; char name[20]; float score; } Student; int main() { Student std[5] = {

구조체 정렬 및 데이터 무결성 검사(버블)

C
1 month ago
#include <stdio.h> typedef struct { int num; char name[20]; float score; } Student; int main() { Student std[5] = {