add: description [cpp]
This commit is contained in:
parent
9ac09a4f1d
commit
8e5e7c1d84
|
|
@ -5,6 +5,12 @@
|
|||
#include <algorithm>
|
||||
#include <unordered_map>
|
||||
|
||||
/**
|
||||
* 819. Most Common Word
|
||||
* Given a string paragraph and a string array of the banned words banned, return the most frequent word that is not banned. It is guaranteed there is at least one word that is not banned, and that the answer is unique.
|
||||
* The words in paragraph are case-insensitive and the answer should be returned in lowercase.
|
||||
*/
|
||||
|
||||
class Solution {
|
||||
public:
|
||||
static std::string mostCommonWord(std::string paragraph, const std::vector<std::string>& banned) {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@ struct TreeNode {
|
|||
explicit TreeNode(int x = 0, TreeNode* l = nullptr, TreeNode* r = nullptr) : val(x), left(l), right(r) {}
|
||||
};
|
||||
|
||||
/**
|
||||
* 897. Increasing Order Search Tree
|
||||
* Given the root of a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and only one right child.
|
||||
*/
|
||||
|
||||
class Solution {
|
||||
public:
|
||||
static TreeNode* increasingBST(TreeNode* root, TreeNode* greater = nullptr) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue