Coding

코딩 문제 연습 및 풀이

Merge Overlapping Interval

2 minute read

The city of Gridland is represented as an matrix where the rows are numbered from to and the columns are numbered from to .

Connected Cells in a Grid

2 minute read

Consider a matrix where each cell contains either a or a . Any cell containing a is called a filled cell. Two cells are said to be connected if they are adja...

Count Luck

2 minute read

Ron and Hermione are deep in the Forbidden Forest collecting potion ingredients, and they’ve managed to lose their way. The path out of the forest is blocked...

Cut the Tree

1 minute read

Anna loves graph theory! She has a tree where each vertex is numbered from 1 to n, and each contains a data value.

Fraud Activity Notification

3 minute read

HackerLand National Bank has a simple policy for warning clients about possible fraudulent account activity. If the amount spent by a client on a particular ...

The Full Counting Sort

1 minute read

In this challenge you need to print the string that accompanies each integer in a list sorted by the integers. If two strings are associated with the same in...

Lily’s Homework

2 minute read

Whenever George asks Lily to hang out, she’s busy doing homework. George wants to help her finish it faster, but he’s in over his head! Can you help George u...

KnightL on a Chessboard

2 minute read

KinghtL is a chess piece that moves in an L shape. We define the possible moves of as any movement from some position \((x_1, y_1)\) to some \((x_2, y_2)\) s...

Between Two Sets

2 minute read

You will be given two arrays of integers and asked to determine all integers that satisfy the following two conditions:

Climbing the Leaderboard

1 minute read

Alice is playing an arcade game and wants to climb to the top of the leaderboard and wants to track her ranking. The game uses Dense Ranking, so its leaderbo...

Non-Divisible Subset

1 minute read

Given a set of distinct integers, print the size of a maximal subset of S where the sum of any 2 numbers in \(S'\) is not evenly divisible by k.

[Search] Red Knight’s Shortest Path

3 minute read

n ordinary chess, the pieces are only of two colors, black and white. In our version of chess, we are including new pieces with unique movements. One of the ...

Components in a graph

1 minute read

그래프의 엣지가 주어졌을 때, 연결되어 있는 가장 큰 엣지의 개수와 가장 작은 수를 출력하는 문제이다.

[Greedy] 구명보트

1 minute read

최대한 많이 태워 구명보트를 적게 사용하는 문제이다.

더 맵게

3 minute read

힙을 사용하여 푸는 문제.

튜플

less than 1 minute read

튜플로 이루어진 요소를 정리하는 문제이다. 카카오 인턴십 두번째 문제로 난이도는 낮은 편이다.

호텔 방 배정

3 minute read

문제를 이해하는 거는 쉬웠지만 풀이 자체가 굉장히 어려웠던 문제다.