Home
My Technical Diary
Cancel

algospot - 문자열 합치기

문자열 합치기 - 중 문제 프로그래밍 언어 C 의 큰 문제점 중 하나는 언어 차원에서 문자열 변수형을 지원하지 않는다는 것입니다. C 에서는 문자 배열로 문자열을 표현하되 \0 (NULL) 로 문자열의 끝을 지정하는데, 이래서는 문자열의 길이를 쉽게 알 수 있는 방법이 없기 때문에 여러 가지 문제가 발생하게 됩니다. void strcat(ch...

algospot - 삼각형 위의 최대 경로

삼각형 위의 최대 경로 - 하 문제 6 1 2 3 7 4 9 4 1 7 2 7 5 9 4 위 형태와 같이 삼각형 모양으로 배치된 자연수들이 있습니다. 맨 위의 숫자에서 시작해, 한 번에 한 칸씩 아래로 내려가 맨 아래 줄로 내려가는 경로를 만들려고 합니다. 경로는 아래 줄로 내려갈 때마다 바로 아래 숫자, 혹은 오른쪽 아래...

LeetCode - 700. Search in a Binary Search Tree

700. Search in a Binary Search Tree - easy 문제 Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node’s value equals the given value. R...

LeetCode - 942. DI String Match

942. DI String Match - easy 문제 Given a string S that only contains “I” (increase) or “D” (decrease), let N = S.length. Return any permutation A of [0, 1, …, N] such that for all i = 0, …, N-1:...

LeetCode - 94. Binary Tree Inorder Traversal

94. Binary Tree Inorder Traversal - medium 문제 Given a binary tree, return the inorder traversal of its nodes’ values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2]...

LeetCode - 78. Subsets

78. Subsets - medium 문제 Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. 제한사항 입출력 예 Input: num...

LeetCode - 746. Min Cost Climbing Stairs

746. Min Cost Climbing Stairs - easy 문제 On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. You...

LeetCode - 64. Minimum Path Sum

64. Minimum Path Sum - medium 문제 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You...

LeetCode - 62. Unique Paths

62. Unique Paths - medium 문제 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time....

LeetCode - 60. Permutation Sequence

60. Permutation Sequence - medium 문제 The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following sequence for...