Go, Vantage point
가까운 곳을 걷지 않고 서는 먼 곳을 갈 수 없다.
Github | https://github.com/overnew/
Blog | https://everenew.tistory.com/
문제 https://leetcode.com/problems/top-k-frequent-elements/description/ Top K Frequent Elements - LeetCode Can you solve this real interview question? Top K Frequent Elements - Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] leetcode.com 풀이 난이도: Medium 숫자 배열에서 가장 많..
문제 https://leetcode.com/problems/word-search-ii/description/ Word Search II - LeetCode Can you solve this real interview question? Word Search II - Given an m x n board of characters and a list of strings words, return all words on the board. Each word must be constructed from letters of sequentially adjacent cells, where adjacent cells are leetcode.com 풀이 난이도: Hard 단순한 접근으로는 시간초과가 발생하는 문제이다. DF..
문제 https://leetcode.com/problems/design-add-and-search-words-data-structure/ Design Add and Search Words Data Structure - LeetCode Can you solve this real interview question? Design Add and Search Words Data Structure - Design a data structure that supports adding new words and finding if a string matches any previously added string. Implement the WordDictionary class: * WordDictionar leetcode.c..
릿코드의 문제 중에서 Trie(트라이) 또는 Prefix Tree를 구현하는 문제가 나온다. 문제 https://leetcode.com/problems/implement-trie-prefix-tree/description/ Implement Trie (Prefix Tree) - LeetCode Can you solve this real interview question? Implement Trie (Prefix Tree) - A trie [https://en.wikipedia.org/wiki/Trie] (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dat..
문제 https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/description/ Lowest Common Ancestor of a Binary Search Tree - LeetCode Can you solve this real interview question? Lowest Common Ancestor of a Binary Search Tree - Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST. According to the definition of LCA on Wikipedi..
문제 https://leetcode.com/problems/kth-smallest-element-in-a-bst/description/ Kth Smallest Element in a BST - LeetCode Can you solve this real interview question? Kth Smallest Element in a BST - Given the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the tree. Example 1: [https://assets.leetco leetcode.com 풀이 난이도: Medium..
문제 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 풀이 난이도: Medium ..
문제 https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/description/ 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 th..
문제 https://leetcode.com/problems/subtree-of-another-tree/description/ Subtree of Another Tree - LeetCode Can you solve this real interview question? Subtree of Another Tree - Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and false otherwise. A subtree of a bin leetcode.com 풀이 난이도: Easy 주어진 이진 sub..
문제 https://leetcode.com/problems/serialize-and-deserialize-binary-tree/description/ Serialize and Deserialize Binary Tree - LeetCode Can you solve this real interview question? Serialize and Deserialize Binary Tree - Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a n leetcode..