SW개발/코딩테스트

    [LeetCode]Decode String

    https://leetcode.com/problems/decode-string/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 문제 분석 주어진 문자열을 패턴에 알맞게 디코딩하는 문제입니다. 숫자가 나오면 [] 안에 위치한 문자를 반복합니다. 처음 시도한 답안 class Solution(object): def decodeString(se..

    [Leetcode]Binary Tree Right Side View

    https://leetcode.com/problems/binary-tree-right-side-view/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 문제 분석 이진 트리가 주어졌을때 오른쪽에서 본 순서대로 출력합니다. 처음 시도한 답안 - 실패 # Definition for a binary tree node. # class TreeN..

    [LeetCode]Product of Array Except Self

    https://leetcode.com/problems/product-of-array-except-self/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 문제 분석 nums 배열이 주어지면 자신을 제외한 숫자들의 곱을 구하는 문제입니다. 단, 나눗셈 연산은 금지되어 있습니다. 처음 시도한 답안 class Solution: def prod..

    [LeetCode]Find the Duplicate Number

    https://leetcode.com/problems/find-the-duplicate-number/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 문제 분석 주어진 숫자 배열에서 두번 이상 반복되는 숫자를 찾는 문제입니다. 나머지 숫자는 정확히 딱 1번만 등장합니다. 처음 시도한 답안 - 실패 class Solution: def fin..

    [LeetCode]Search a 2D Matrix II

    https://leetcode.com/problems/search-a-2d-matrix-ii/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 문제 분석 주어진 m*n 2D Matrix에서 원하는 target 값이 있는지 찾는 문제입니다. 처음 시도한 답안 class Solution: def searchMatrix(self, matrix:..

    [LeetCode]Kth Smallest Element in BST

    https://leetcode.com/problems/kth-smallest-element-in-a-bst/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 문제 분석 주어진 Binary Search Tree에서 K번째로 작은 숫자를 찾는 문제입니다. 처음 시도한 답안 # Definition for a binary tree node. # ..

    [Leetcode]Kth Largest Element in an Array

    https://leetcode.com/problems/kth-largest-element-in-an-array/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 문제 분석 주어진 배열에서 k번째로 큰 숫자를 구하는 문제입니다. 처음 시도한 답안 - 실패 class Solution: def findKthLargest(self, nums: L..

    [LeetCode]Construct Binary Tree from Preorder and Inorder Traversal

    https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ Construct Binary Tree from Preorder and Inorder Traversal - LeetCode Can you solve this real interview question? Construct Binary Tree from Preorder and Inorder Traversal - Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder trave..

    [LeetCode]Binary Tree Level Order Traversal

    https://leetcode.com/problems/binary-tree-level-order-traversal/description/ Binary Tree Level Order Traversal - LeetCode Can you solve this real interview question? Binary Tree Level Order Traversal - Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Example 1: [https://assets.leetcode.com/u leetcode.com 문제 분석 주어진..

    [LeetCode]Validate Binary Search Tree

    https://leetcode.com/problems/validate-binary-search-tree/description/ Validate Binary Search Tree - LeetCode Can you solve this real interview question? Validate Binary Search Tree - Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: * The left subtree of a node contains only nodes with keys le leetcode.com 문제 분석 주어진 Tree가 유효..