剑指offer
##这是我的第一篇博客:😄
字符串1234567//字符串向字符数组的转化char[] ch = str.toCharArray();//拷贝一部分字符数组ch = Arrays.copyOfRange(ch,1,ch.length);
整形的最大最小值12Integer.MAX_VALUEInteger.MIN_VALUE
LinkedListLinkedList stack1;
LinkedList实现了Deque接口,所以Stack能做的事LinkedList都能做,其本身结构是个双向链表,扩容消耗少
模拟实现栈,使用ArrayList的效率大于使用LinkedList 利用单调递减队列实现滑动窗口最大值: 类似于min栈中的最小值,有意思的是:初始化的状态是i=1-k,j=0
Queue队列
Queue的实现类有LinkedList和PriorityQueue,第一个最常用;
压入元素:add(), offer()
弹出元素:remove(), poll()
获取头元素:element(), peek()
区别:容量为0的时候,element ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment