[dp]300. Longest Increasing Subsequence [python]
Given an integer array nums, return the length of the longest strictly increasing subsequence. A subsequence is a sequence that can be derived from an array by deleting some or no elements without changing the order of the remaining elements. For example, [3,6,2,7] is a subsequence of the array [0,3,1,6,2,2,7]. Example 1: Input: nums = [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest inc..
[c++][LeetCode Curated Algo 170][314. Binary Tree Vertical Order Traversal]
문제 Given the root of a binary tree, return the vertical order traversal of its nodes' values. (i.e., from top to bottom, column by column). If two nodes are in the same row and column, the order should be from left to right. Input: root = [3,9,8,4,0,1,7,null,null,null,2,5] Output: [[4],[9,5],[3,0,1],[8,2],[7]] Input: root = [3,9,20,null,null,15,7] Output: [[9],[3,15],[20],[7]] 한줄해석 위와 같은 tree 구조..