链接 https://leetcode-cn.com/problems/implement-stack-using-queues/ 思路 首先演示push()操作;将元素依次进入队1,进入时用top元素保存当前进入的元素;如下图: push操作的演示 然后演示pop()操作;先将除队1中的最后一个元 ...
分类:
编程语言 时间:
2020-02-03 09:39:08
阅读次数:
74
原英文帮助文档: class int([x])class int(x, base=10) Return an integer object constructed from a number or string x, or return 0 if no arguments are given. If ...
分类:
编程语言 时间:
2020-02-01 23:04:44
阅读次数:
99
题目链接 https://leetcode-cn.com/problems/implement-queue-using-stacks/ 题目描述 使用栈实现队列的下列操作: push(x) -- 将一个元素放入队列的尾部。pop() -- 从队列首部移除元素。peek() -- 返回队列首部的元素。 ...
分类:
编程语言 时间:
2020-02-01 11:00:22
阅读次数:
91
1.1 简介开源servlet容器java语言编写启动更快,性能更优1.2 下载镜像$docker run -d jetty$docker run -d -p 80:8080 jetty ...
分类:
Web程序 时间:
2020-01-31 14:36:59
阅读次数:
78
效果展示 代码 背景图自行贴入,如果需要copy代码的话。 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>注册</title> <style> html,body{ margin: 0,0; padding: 0,0; } h ...
分类:
Web程序 时间:
2020-01-30 23:01:28
阅读次数:
101
文本 <input v-model="message" placeholder="edit me"> <p>Message is: {{ message }}</p> 多行文本 <span>Multiline message is:</span> <p style="white-space: pre ...
分类:
其他好文 时间:
2020-01-30 22:50:50
阅读次数:
85
# ubuntu下 redis的安装使用 - ## 安装 ### 1. 进入redis安装路径 ` cd ~/installed/redis-5.0.7 ` ### 2. 启动redis ` redis-server ` ...
分类:
系统相关 时间:
2020-01-30 12:36:01
阅读次数:
156
"no-alert": 0,//禁止使用alert confirm prompt "no-array-constructor": 2,//禁止使用数组构造器 "no-bitwise": 0,//禁止使用按位运算符 "no-caller": 1,//禁止使用arguments.caller或argum ...
分类:
其他好文 时间:
2020-01-29 12:47:34
阅读次数:
102
web.xml各个版本文件头: Servlet 3.1 Java EE 7 XML schema, namespace is http://xmlns.jcp.org/xml/ns/javaee/ <?xml version="1.0" encoding="UTF-8"?> <web-app xml ...
分类:
Web程序 时间:
2020-01-28 20:49:23
阅读次数:
82
类型转换函数一般不会更改被转换的对象,所以通常被定义为const成员。 类型转换函数可以被继承,可以是虚函数。 以Double类型转换为bool类型为例: Double::operator bool() const { if (_num.size() > 1) return true; return ...
分类:
其他好文 时间:
2020-01-27 22:23:23
阅读次数:
117