自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

dsbwyx's blog

努力提高姿势中...

  • 博客(17)
  • 资源 (2)
  • 收藏
  • 关注

原创 Leetcode #516. Longest Palindromic Subsequence

Leetcode #516. Longest Palindromic Subsequence题目https://leetcode.com/problems/longest-palindromic-subsequence/description/代码比较典型的动态规划问题。递归写了一遍TLE了,循环方法没有问题。class Solution {public: ...

2018-05-06 17:09:03 139

原创 Leetcode #39. Combination Sum

Leetcode #39. Combination Sum题目https://leetcode.com/problems/combination-sum/description/代码class Solution {public: void foo(vector<int>& candidates, int target, int cidx, vect...

2018-04-12 20:08:17 162

原创 Leetcode #121. Best Time to Buy and Sell Stock

Leetcode #121. Best Time to Buy and Sell Stock题目https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/代码class Solution {public: int maxProfit(vector<int>& pr...

2018-04-11 23:39:51 134

原创 Leetcode #231. Power of Two

Leetcode #231. Power of Two题目https://leetcode.com/problems/power-of-two/description/代码我的:class Solution {public: bool isPowerOfTwo(int n) { if (n <= 0) return false; ...

2018-04-11 23:31:48 118

原创 Leetcode #780. Reaching Points

Leetcode #780. Reaching Points题目https://leetcode.com/problems/reaching-points/description/代码一开始的思路是逆向推,目的坐标(tx, ty)肯定是由(tx-ty, ty)或(tx, ty-tx),但是坐标限定不为负数,因此比较tx、ty的大小可以唯一确定上一步的步骤于是有:cl...

2018-04-10 23:23:55 212

原创 Leetcode #746. Min Cost Climbing Stairs

Leetcode #746. Min Cost Climbing Stairs题目https://leetcode.com/problems/min-cost-climbing-stairs/description/代码Simple Question. 没啥好说的,数组那里优化下,用两个变量就可以。class Solution {public: int minCo...

2018-04-10 22:40:40 145

原创 Leetcode #395. Longest Substring with At Least K Repeating Characters

Leetcode #395. Longest Substring with At Least K Repeating Characters题目链接https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/description/代码思路:首先检查当前字符串是否满足...

2018-04-10 22:23:07 129

原创 Leetcode #7. Reverse Integer

class Solution: def reverse(self, x): """ :type x: int :rtype: int """ ret = 0 nega = 0 if x > 0 else 1 if nega: x = -x

2017-12-26 01:18:55 185

原创 Ubuntu下安装GPU版xgboost python库

安装过程见官方文档:http://xgboost.readthedocs.io/en/latest/build.html主要有以下两步1. 下载源代码git clone --recursive https://github.com/dmlc/xgboost2. 编译GPU共享库cd xgboostmkdir buildcd buildcmake .. -DUSE_C

2017-11-04 20:21:24 1521

原创 #6. ZigZag Conversion

1. 题目ZigZag字符串的描述见题目链接。给定行号,对于一个ZigZag字符串,需要按行号顺序输出每行的内容。2. 代码# 比较简单,将ZigZag字符串按顺序遍历,每个字符放入对应行中class Solution(object): def convert(self, s, numRows): """ :type s: str :type

2017-02-10 03:35:06 248

原创 leetcode #4: Median of Two Sorted Arrays

题目链接: Median of Two Sorted Arrays这道题坑还是有点多的,刚看到的时候第一反应是:这不就是归并排序....还是图样啊。所以先这样提交了:class Solution(object): def findMedianSortedArrays(self, nums1, nums2): """ :type nums1:

2016-07-31 00:33:51 305

原创 nachos lab1-线程机制

总体概述本次lab的主要内容是拓展nachos的线程机制,在nachos的线程模型中添加tid和uid,并添加相应的管理机制。本次lab的重要知识点在于对nachos中线程具体实现方式的理解, 任务完成情况Exercise 1 –> YExercise 2 –> YExercise 3 –> YExercise 4 –> Y具体完成情况如下所示:Exercise 1 调研 调研Lin

2016-07-31 00:27:10 6659

原创 TCPCopy

简介TCPCopy是一种请求复制(所有基于tcp的packets)工具,可以把在线流量导入到测试系统中。 Architecture如上图所示,tcpcopy由以下三个部分组成online serveronline server上运行tcpcopy,在网络层复制raw packets,tcpcopy修改包的目地址,发给测试机target servertarget server被测应用处理tcpcop

2016-07-31 00:19:58 624

原创 nachos lab3-线程同步

总体概述本次lab的主要内容是拓展同步机制,实现同步互斥实例本次lab的重要知识点在于对同步互斥原理的理解 任务完成情况Exercise 1 –> YExercise 2 –> YExercise 3 –> YExercise 4 –> YChallenge 1 –> YChallenge 2 –> Y具体完成情况如下所示:Exercise 1 调研 调研Linux中实现的同步机

2016-07-31 00:18:57 2480

原创 nachos lab2-线程调度

总体概述本次lab的主要内容是扩展线程调度算法,实现基于优先级的抢占式调度算法我认为,本次lab的关键在于理解Timer、Scheduler和Interrupt之间的关系,从而理解线程之间是如何进行调度的 任务完成情况Exercise 1 –> YExercise 2 –> YExercise 3 –> YChallenge 1 –> Y具体完成情况如下所示:Exercise 1 调研

2016-07-31 00:17:24 5570 2

原创 xv6阅读报告一(中间图片懒得贴了==)

xv6中断初始化

2014-10-12 22:16:24 2673

原创 ruby2.1.1安装时编译源码,readline.c出现错误

系统是ubuntu14.04因为之前实验室机子坏了xu'yao'chong'zhuang

2014-10-09 21:21:41 756

xv6操作系统整体报告

xv6操作系统整体报告,结合源码比较详细的介绍了xv6各个模块的功能,适合初学者用

2014-10-14

微型操作系统xv6源码

这是微型操作系统xv6的源码,总代码量在10000行左右,适合用于学习操作系统相关知识

2014-10-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除