ubuntu20.04:mysql主库
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
# 修改完毕重启
sudo service mysql stop
sudo service mysql start主库mysqld.cnf配置 [mysqld]
...
# bind-address>->--- 127.0.0.1 # 注释掉,允许外部连接
# mysqlx-b…
栈和队列
1. 用两个栈实现队列
原题链接
补充:copy(a,b) 把a赋值给b class MyQueue {
public:/** Initialize your data structure here. */stack<int> stk, cache;MyQueue() {}/** Push element x to the back of queue. */void push(int x) {stk.push(x)…