摘要:
基础的三个模板:traverse, dc, bst 【traverse模板】 题:700. Search in a Binary Search Tree 在bst中返回目标所在的最小子树 class Solution { public TreeNode searchBST(TreeNode root 阅读全文
摘要:
StatusTitleSolutionAcceptanceDifficultyFrequency438. Find All Anagrams in a String50.0%Medium200. Number of Islands56.7%Medium2421. Number of Good Pat 阅读全文
摘要:
You are given an inclusive range [lower, upper] and a sorted unique integer array nums, where all elements are in the inclusive range. A number x is c 阅读全文
摘要:
Design and implement an iterator to flatten a 2d vector. It should support the following operations: next and hasNext. Example: Vector2D iterator = ne 阅读全文
摘要:
Given a string s and an integer k, return the length of the longest substring of s that contains at most k distinct characters. Example 1: Input: s = 阅读全文
摘要:
1348. Tweet Counts Per Frequency Medium 130231Add to ListShare A social media company is trying to monitor activity on their site by analyzing the num 阅读全文
摘要:
You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward i 阅读全文
摘要:
There are n cities connected by some number of flights. You are given an array flights where flights[i] = [fromi, toi, pricei] indicates that there is 阅读全文
摘要:
You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can 阅读全文