摘要:
一、问题 有时候我们登录Mysql输入密码的时候,会出现这种情况 mysql -u root -p Enter Password > '密码' 错误:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwo 阅读全文
摘要:
字典树 在计算机科学中,trie,又称前缀树或字典树,是一种有序树,用于保存关联数组,其中的键通常是字符串。与二叉查找树不同,键不是直接保存在节点中,而是由节点在树中的位置决定。一个节点的所有子孙都有相同的前缀,也就是这个节点对应的字符串,而根节点对应空字符串。一般情况下,不是所有的节点都有对应的值 阅读全文
摘要:
5621. 无法吃午餐的学生数量 思维 判断栈中那种三明治比所需人多,找多出来的位置以后便是不可取的 class Solution { public: int countStudents(vector<int>& students, vector<int>& sandwiches) { int n 阅读全文
摘要:
5629. 重新格式化电话号码 模拟 注意一些细节,最后位置是否取值。 class Solution { public: string reformatNumber(string number) { string s; for (auto c: number) if (c != ' ' && c ! 阅读全文
摘要:
1684. 统计一致字符串的数目 简单模拟 class Solution { public: int countConsistentStrings(string allowed, vector<string>& words) { int n = words.size(),num = 0; int h 阅读全文