- 博客(11)
- 收藏
- 关注
原创 多线程生产者消费者问题
互斥锁和条件变量:https://blog.csdn.net/i_love_blog/article/details/72630121信号量:https://blog.csdn.net/fuzhongmin05/article/details/54616344
2018-04-27 15:44:23 168
原创 python中的insert和append
两者都是对python内的列表进行操作,append()方法是值在列表的末尾增加一个数据项,insert()方法是指在某个特定位置前加一个数据项。Python内的list实现是通过数组实现的,而不是链表的形式,所以每当执行insert()操作时,都要将插入位置的元素向后移动才能在相应的位置插入元素,执行append()操作时,如果分配的空间还足够大的话那么就可以直接插到最后,如果空间不够的话就需要...
2018-04-26 21:51:49 6268
原创 leetcode|18. 4Sum
Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of tar...
2018-04-15 22:30:45 110
原创 leetcode|16. 3Sum Closest
Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would ...
2018-04-14 10:52:16 223 1
原创 leetcode|15. 3Sum
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not contain ...
2018-04-14 09:44:12 125 1
原创 leetcode|11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two ...
2018-04-13 20:43:38 161 3
原创 leetcode|6. ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I I G...
2018-04-13 19:45:59 121 1
原创 win10睡眠状态下唤醒花屏
原因是前一天更新过Windows,显卡驱动版本过高与自身电脑并不适配。一、下载一个驱动精灵体检之后进入驱动管理,再显卡那里根据他的提示下载最合适的显卡并安装即可。有一点恶心的是会有捆绑安装二、独自安装首先再Intel官网上下载驱动的时候会让你选择需要下载什么驱动,如果不确定的话当时可以下载一个SSU.exe(Intel的)来帮助你决定,下载下来即可。右键我的电脑->管理->硬件管理-&...
2018-04-13 14:22:37 5409
原创 LeetCode|14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.Method1:横向比较class Solution {public: //indexof返回某个字符串首次在string出现的位置 string longestCommonPrefix(vector<stri...
2018-04-10 21:47:39 291
原创 比赛之后的碎碎念
大二,参加了实验室,像学长学姐一样开始参加比赛,Intel杯 相比于去年,今年赛制发生改变,时间短了,作为一群学过了C语言,C++以及Java的我们表示丝毫不畏惧,再加上老师告诉我们我们在这个比赛上的成绩一直很好。 预料之中,初赛落选,意料之外,实验室全军覆没。 虽然没有成功,但比赛一直是一个学习的过程,哇,但是感觉自己似乎也是啥也没学,一直在下软件,配环...
2018-04-04 22:42:21 120 1
原创 读 孙卫琴《Tomcat与Javaweb开发技术详解》
最初读这本书是因为做比赛要用到服务器端,但是网络上的知识太多了,感觉自己丝毫没有头绪,于是在知乎上找到了一本推荐的书,如上。 现在对于网络编程的那些细节还没有去了解,甚至说是环境还没有按照书上配好,但是按照书上的章节,以一定的节奏算是把这本书看完了。至少目前对于网络编程有一个了解,知道了jsp文件是干嘛的,xml文件中那些奇奇怪怪的符号是干嘛的,啥是servlet,啥是Tomcat,啥是MV...
2018-04-04 22:22:31 5997 5
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人