본문 바로가기

전체 글

(2344)
(SQL) - LeetCode (easy) 1050. Actors and Directors Who Cooperated At Least Three Times https://leetcode.com/problems/actors-and-directors-who-cooperated-at-least-three-times/ Actors and Directors Who Cooperated At Least Three Times - LeetCode Can you solve this real interview question? Actors and Directors Who Cooperated At Least Three Times - Table: ActorDirector +-------------+---------+ | Column Name | Type | +-------------+---------+ | actor_id | int | | director_id | int | | ..
(C++) - LeetCode (easy) 1047. Remove All Adjacent Duplicates In String https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/description/ Remove All Adjacent Duplicates In String - LeetCode Can you solve this real interview question? Remove All Adjacent Duplicates In String - You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them. We repeatedl leetc..
(C++) - LeetCode (easy) 1046. Last Stone Weight https://leetcode.com/problems/last-stone-weight/description/ Last Stone Weight - LeetCode Can you solve this real interview question? Last Stone Weight - You are given an array of integers stones where stones[i] is the weight of the ith stone. We are playing a game with the stones. On each turn, we choose the heaviest two stones and smash them leetcode.com simulation 문제였습니다. 📕 풀이방법 📔 풀이과정 stones..
(C++) - LeetCode (easy) 1037. Valid Boomerang https://leetcode.com/problems/valid-boomerang/description/ Valid Boomerang - LeetCode Can you solve this real interview question? Valid Boomerang - Given an array points where points[i] = [xi, yi] represents a point on the X-Y plane, return true if these points are a boomerang. A boomerang is a set of three points that are all distinct and leetcode.com 직선의 기울기를 이용한 문제였습니다. 📕 풀이방법 📔 풀이과정 📕 Code 📔..
(C++) - LeetCode (easy) 1030. Matrix Cells in Distance Order https://leetcode.com/problems/matrix-cells-in-distance-order/description/ Matrix Cells in Distance Order - LeetCode Can you solve this real interview question? Matrix Cells in Distance Order - You are given four integers row, cols, rCenter, and cCenter. There is a rows x cols matrix and you are on the cell with the coordinates (rCenter, cCenter). Return the coordinates leetcode.com bfs 문제였습니다. 📕..
(C++) - LeetCode (easy) 1025. Divisor Game https://leetcode.com/problems/divisor-game/description/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 풀이과정 0 < x < n 며 n의 인수 x 중에서 최적으로 정답을 고르는 경우는 1을 고르는 것입니다.서로 1을 고르게 된다면 최종적으로 1이 남으면 그 사람이 지므로 짝수인 ..
(C++) - LeetCode (easy) 1021. Remove Outermost Parentheses https://leetcode.com/problems/remove-outermost-parentheses/description/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 간단 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 정답 변수 ans, 깊이 depth를 선언해줍니다. 📔 풀이과정 valid한 형태의 문자열이 들어오므로 s의 원소를 순회하며 바..
(C++, Rust) - LeetCode (easy) 1013. Partition Array Into Three Parts With Equal Sum https://leetcode.com/problems/sum-of-root-to-leaf-binary-numbers/description/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 자료구조 순회 문제였습니다. 📕 풀이방법 📔 풀이과정 트리를 직선형태로 순회하며 그 직선 형태의 길별로 값을 더하는 형태이므로 dfs형식으로 순회하는 것이 구현에 편리합니다...