leetcode.com 2026-02-09
🟡1382.balance-a-binary-search-tree
🏷️ Tags
#greedy #tree #depth_first_search #binary_search_tree #divide_and_conquer #binary_tree
🟡1382.balance-a-binary-search-tree
🏷️ Tags
#greedy #tree #depth_first_search #binary_search_tree #divide_and_conquer #binary_tree
Telegraph
balance-a-binary-search-tree
Given the root of a binary search tree, return a balanced binary search tree with the same node values. If there is more than one answer, return any of them. A binary search tree is balanced if the depth of the two subtrees of every node never differs by…
leetcode.cn 2026-02-10
🟡3719.longest-balanced-subarray-i
🏷️ Tags
#segment_tree #array #hash_table #divide_and_conquer #prefix_sum
🟡3719.longest-balanced-subarray-i
🏷️ Tags
#segment_tree #array #hash_table #divide_and_conquer #prefix_sum
Telegraph
longest-balanced-subarray-i
给你一个整数数组 nums。
leetcode.com 2026-02-10
🟡3719.longest-balanced-subarray-i
🏷️ Tags
#segment_tree #array #hash_table #divide_and_conquer #prefix_sum
🟡3719.longest-balanced-subarray-i
🏷️ Tags
#segment_tree #array #hash_table #divide_and_conquer #prefix_sum
Telegraph
longest-balanced-subarray-i
You are given an integer array nums. A subarray is called balanced if the number of distinct even numbers in the subarray is equal to the number of distinct odd numbers. Return the length of the longest balanced subarray. Example 1: Input: nums = [2,5,4…
leetcode.cn 2026-02-11
🔴3721.longest-balanced-subarray-ii
🏷️ Tags
#segment_tree #array #hash_table #divide_and_conquer #prefix_sum
🔴3721.longest-balanced-subarray-ii
🏷️ Tags
#segment_tree #array #hash_table #divide_and_conquer #prefix_sum
Telegraph
longest-balanced-subarray-ii
给你一个整数数组 nums。
leetcode.com 2026-02-11
🔴3721.longest-balanced-subarray-ii
🏷️ Tags
#segment_tree #array #hash_table #divide_and_conquer #prefix_sum
🔴3721.longest-balanced-subarray-ii
🏷️ Tags
#segment_tree #array #hash_table #divide_and_conquer #prefix_sum
Telegraph
longest-balanced-subarray-ii
You are given an integer array nums. A subarray is called balanced if the number of distinct even numbers in the subarray is equal to the number of distinct odd numbers. Return the length of the longest balanced subarray. Example 1: Input: nums = [2,5,4…
leetcode.cn 2026-02-12
🟡3713.longest-balanced-substring-i
🏷️ Tags
#hash_table #string #counting #enumeration
🟡3713.longest-balanced-substring-i
🏷️ Tags
#hash_table #string #counting #enumeration
Telegraph
longest-balanced-substring-i
给你一个由小写英文字母组成的字符串 s。
leetcode.com 2026-02-12
🟡3713.longest-balanced-substring-i
🏷️ Tags
#hash_table #string #counting #enumeration
🟡3713.longest-balanced-substring-i
🏷️ Tags
#hash_table #string #counting #enumeration
Telegraph
longest-balanced-substring-i
You are given a string s consisting of lowercase English letters. A substring of s is called balanced if all distinct characters in the substring appear the same number of times. Return the length of the longest balanced substring of s. Example 1: Input:…