07 2017 档案
摘要:题目 Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 分析 判断链表是否有环,采用快慢指针,如果相遇则表示有环 AC代码
阅读全文
摘要:题目 Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up: Can
阅读全文
摘要:原题 Given a singly linked list L: L0?L1?…?Ln 1?Ln, reorder it to: L0?Ln?L1?Ln 1?L2?Ln 2?… You must do this in place without altering the nodes' values.
阅读全文
摘要:原题 Given a binary tree, return the preorder traversal of its nodes' values. 分析 对二叉树进行先序遍历,即根节点 左子树 右子树 代码: 递归: 递归代码十分简单,建立一个vector作为返回的结果,现将根节点push进去,
阅读全文
摘要:__描述:__ Given a binary tree, return the postorder traversal of its nodes' values. 直接递归,按照 左子树 右子树 头结点的顺序 AC代码:
阅读全文
摘要:__描述:__ Sort a linked list using insertion sort. 使用插入排序对一个链表进行排序 普通的插入排序,时间复杂度O(n^2)
阅读全文
摘要:Sort a linked list in O(n log n) time using constant space complexity.
阅读全文
摘要:sublime lincense for linux Sublime Text 3.x (after Build 3133)—– BEGIN LICENSE —–TwitterInc200 User LicenseEA7E-8900071D77F72E 390CDD93 4DCBA022 FAF60
阅读全文
摘要:虽然manjaro是基于arch修改的,但毕竟还是有些改动,如果可以用manjaro仓库里的,尽量不要用arch的源.如果嫌官方的软件源慢,可以直接一条命令修改成国内的软件源
阅读全文
摘要:archlinux采用滚动更新,需要经常更新系统,因此一个快速且足够新的镜像就很重要了 获得镜像列表 选择镜像主要考虑速度和状态两方面,速度快的镜像可以让你更快的更新系统,状态新的镜像可以是你的系统一直保持最新状态. 如果你想知道知道中国大陆都有哪些镜像站可以访问 "Pacman镜像列表生成器" 或
阅读全文
摘要:sublime自带vim模式 ,只是默认是 状态,因此如果按 键没有进入vim模式,只需要按 进入命令模式,键入 ,输入 就可以启用vim. 同样,你也可以输入 禁用不常用的包,以提高sublime的启动速度
阅读全文
摘要:能访问https://www.wikipedia.org大部分时候我们是可以访问的wikipedia的主页或是英文首页的,但中文页面却经常被墙,这时候你可以通过在命令行下ping www.wikipedia.org得到返回的IP地址,然后改hosts文件,添加198.35.26.96...
阅读全文
摘要:栏目代码 解释自带的文章搜索只能搜索整个CSDN博客,而不能指定某个博客,这是因为百度只支持site:blog.csnd.net搜索整个域名下...
阅读全文
摘要:Description: Given a string, find the length of the longest substring without repeating characters. 查找最长的不重复子字符串 Examples:Given "abcabcbb...
阅读全文
摘要:Python Web 介绍Python的Web服务器分为服务器程序和应用程序。服务器程序负责接收客户端的请求发送给应用程序,应用程序负责处理请求返回给服务器程序。为了方便应用程序的开发,我们把常用的功能封装起来,成为各种Web开发框架,例如 Django, Flask, Tornad...
阅读全文
摘要:题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integ...
阅读全文
摘要:题目: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down t...
阅读全文
摘要:打开ModelSim,新建工程->新建Verilog文件demo.v 输入文件内容module demo(); reg[3:0] a,b; initial begin $display("Hello, World"); a ...
阅读全文
摘要:功能 通过按tab自动跳过右括号,右引号,虽然也可以按右方向键,但离得太远按起来太麻烦在首选项->按键绑定里添加:{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true},...
阅读全文
摘要:Next主题默认对超链接只有下划线样式,很容易被忽略,就想着怎么修改下 主题样式是在\hexoBlog\themes\next\source\css,这里面保存了Muse,Mist和Pisces三个主题的css文件,例如,字体的边框的颜色还有字体图片的大小等就保存在next\sour...
阅读全文
摘要:编辑插件 sublime自带的markdown语法高亮并不是很友好,推荐安装Markdown Editing,github主页然后在视图->语法里选择MarkdownEditing启用,支持三种风格,分别是Standard Markdown, GitHub flavored Markdown, Mu
阅读全文
摘要:用过vs的人都知道,vs会自动在代码中运算符的前后加空格,比如 i=1; 换行后会自动变成i = 1; 开始觉得这个挺烦的,后来习惯了,发现这个功能还是挺好的,然代码更清晰. 最近换了sublimetext3,也想有类似功能,找了好久,没有发现很满意的,于是就自己动手了 代码很简单 ...
阅读全文
摘要:原题: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their...
阅读全文
摘要:题目: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each inpu...
阅读全文
摘要:亲测wingIDE pro6.0.6-1激活成功算号器下载激活的时候选择第三项 打开算号器,获得license id 把算号器里的license id输入到第一步的输入框里continue得到request code 把request code输入到算号器里,得到activati...
阅读全文
摘要:C++中类的成员的权限:private:只能由该类的成员函数,友元函数访问,不能被该类的对象访问。protected:除了private外还能被子类的函数访问,同样不能被该类的对象访问。public:除了protected外,还能被该类的对象访问。 privateprotectedpublic类的函...
阅读全文
摘要:从Windows使用字体如果有一个安装了Windows的分区, 可以通过链接它们来使用其字体。例如, Windows的C:\盘被挂载在/windows:# ln -s /windows/Windows/Fonts /usr/share/fonts/WindowsFonts然后重新生成字体缓存:# f...
阅读全文

浙公网安备 33010602011771号