自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 手写一个Linux下的debug工具()

断点在这篇文章中,我们要在已有的基础上为程序增加设置断点的功能。中断是怎么形成的我们知道,有两种生成中断的方法:硬件中断和软件中断。硬件中断顾名思义是指通过硬件的输入(如键盘、鼠标)使得相应的寄存器值发生变化,从而中断当前的程序;软件中断则涉及到了修改正在执行的代码。软件中断也称为陷阱在下面我们会专注于软件中断,也就是生成断点。在介绍代码之前,请先自己思考如下三个问题1、如何修改正在...

2018-09-24 07:55:49 317

原创 手写一个Linux下的debug工具(一)

写在前面学习过Linux编程的同学都或多或少用过gdb来调试自己的程序,但是并没有很多的资源让我们学习有关调试器的东西。希望通过这篇文章,你可以了解基本的调试原理,更重要的是可以写出一个自己的简易调试工具。更有趣的是,你可以了解如何修改内存,来“愚弄”你的系统。代码环境系统:Ubuntu 16.04lts语言:C++14必要的库:readline启动debug在进行调试前,首先要执...

2018-09-23 11:12:51 536

原创 弟中弟的Leetcode总结——数组类(十二)

弟中弟的Leetcode总结——数组类(十二)题目描述Target SumYou are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from...

2018-08-31 11:15:32 203

原创 弟中弟的Leetcode总结——数组类(十)

弟中弟的Leetcode总结——数组类(十)题目描述Climbing StairsYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl...

2018-08-31 04:25:53 146

原创 弟中弟的Leetcode总结——数组类(十一)

弟中弟的Leetcode总结——数组类(十一)题目描述Single NumberGiven a non-empty array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runti...

2018-08-31 03:52:16 163

原创 弟中弟的Leetcode总结——字符串类(一)

弟中弟的Leetcode总结——字符串类(一)题目描述Longest SubstringGiven a string, find the length of the longest substring without repeating characters.Example 1: Input: “abcabcbb” Output: 3 Explanation: The an...

2018-08-29 23:15:06 206

原创 弟中弟的Leetcode总结——数组类(九)

弟中弟的Leetcode总结——数组类(九)题目描述SubsetsGiven a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Inp...

2018-08-24 21:09:37 171

原创 弟中弟的Leetcode总结——数组类(八)

弟中弟的Leetcode总结——数组类(八)题目描述Combination SumGiven a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the c...

2018-08-23 08:27:42 188

原创 弟中弟的Leetcode总结——数组类(七)

弟中弟的Leetcode总结——数组类(七)题目描述Maximum SubarrayGiven an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:...

2018-08-20 19:54:57 203

原创 弟中弟的Leetcode总结——数组类(六)

弟中弟的Leetcode总结——数组类(五)题目描述3Sum ClosestGiven 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 i...

2018-08-19 19:51:05 165

原创 弟中弟的Leetcode总结——数组类(五)

弟中弟的Leetcode总结——数组类(五)题目描述Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another arra...

2018-08-19 10:56:59 169

原创 弟中弟的Leetcode总结——数组类(四)

弟中弟的Leetcode总结——数组类(四)题目描述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 input would have exactly one solutio...

2018-08-19 09:53:49 158

原创 弟中弟的Leetcode总结——数组类(三)

弟中弟的Leetcode总结——数组类(三)题目描述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:...

2018-08-19 02:12:17 161

原创 弟中弟的Leetcode总结——数组类(二)

弟中弟的Leetcode总结——数组类(二)题目描述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 ...

2018-08-18 23:14:58 150

原创 弟中弟的Leetcode总结——数组类(一)

弟中弟的Leetcode总结——数组类(一)题目描述There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+...

2018-08-18 22:44:26 190

空空如也

空空如也

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

TA关注的人

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