탐색3 [LeetCode] 409. Longest Palindrome (golang) 문제Longest Palindrome - LeetCodeGiven a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters. Letters are case sensitive, for example, "Aa" is not considered a palindrome here. Example 1: Input: s = "abccccdd"Output: 7Explanation: One longest palindrome that can be built is "dccaccd", whose length is 7.https://.. 2021. 6. 12. [LeetCode] 104. Maximum Depth of Binary Tree (golang) 문제Maximum Depth of Binary Tree - LeetCodeLevel 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.https://leetcode.com/problems/maximum-depth-of-binary-tree/이진 트리에서 최대 깊이 구하기 구현모든 가지를 탐색하여 깊이를 갱신 ( N ) 시간 복잡도O(N) 코드/** * Definition for a binary tree node. * type TreeNode struct { * Val int * Left *TreeNode * Righ.. 2021. 6. 7. [LeetCode] 572. Subtree of Another Tree (golang) 문제Subtree of Another Tree - LeetCodeGiven 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 binary tree tree is a tree that consists of a node in tree and all of this node's descendants.https://leetcode.com/problems/subtree-of-another-tree/부분 트리 유무 확인 구현root트리 탐색 ( N.. 2021. 6. 1. 이전 1 다음