Problem Minimum Absolute Difference in BSTGiven a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example Input: 1 3 ...
Problem Given a string source and a string target, find the minimum window in source which will contain all the characters in target. Notice If there is no such window in source that covers all charac...
Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S = ADOBECODEBANC T = ABC Minimum wi...
Find Minimum in Rotated Sorted Array Problem Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. Noti...
Find Minimum in Rotated Sorted Array I Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. You may a...
...maxDepth(root.right); return Math.max(leftmax,rightmax)+1; } } Minimum Depth of Binary Tree Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along t...
LeetCode[76] Minimum Window Substring Given a string S and a string T, find the minimum window in S whichwill contain all the characters in T in complexity O(n). For example, S = ADOBECODEBANC T = AB...
Problem Given strings S and T, find the minimum (contiguous) substring W of S, so that T is a subsequence of W. If there is no such window in S that covers all characters in T, return the empty string...
Problem There are N workers. The i-th worker has a quality[i] and a minimum wage expectation wage[i]. Now we want to hire exactly K workers to form a paid group. When hiring a group of K workers, we...
...its two sub-nodes. Given such a binary tree, you need to output the second minimum value in the set made of all the nodes value in the whole tree. If no such second minimum value exists, output -1 ...
...you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. 思路 个人觉得这是一道值得回味的二分法题目。与给出target的二分法搜索比,这道题目的target是未知的,并且array是rotated。我个人是从观察给出的例子入手的...
...t graph is then a rooted tree. Among all possible rooted trees, those with minimum height are called minimum height trees (MHTs). Given such a graph, write a function to find all the MHTs and retur...
...t graph is then a rooted tree. Among all possible rooted trees, those with minimum height are called minimum height trees (MHTs). Given such a graph, write a function to find all the MHTs and retur...
...nt right = maxDepth(root.right); return Math.max(left, right) + 1; } } Minimum Depth of Binary Tree Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along ...
ChatGPT和Sora等AI大模型应用,将AI大模型和算力需求的热度不断带上新的台阶。哪里可以获得...
大模型的训练用4090是不合适的,但推理(inference/serving)用4090不能说合适,...
图示为GPU性能排行榜,我们可以看到所有GPU的原始相关性能图表。同时根据训练、推理能力由高到低做了...