2016年3月23日

【LeetCode】 -- 68.Text Justification

摘要: 题目大意:给定一个数组容器,里面存有很多string; 一个int maxWith。让你均匀安排每一行的字符串,能够尽可能的均匀。 解题思路:字符串+贪心。一开始想复杂了,总觉的题意描述的不是很清楚,其实放到实际的场景中去,无非就是想让前端字符串布局变得更加美观,而设计的字符串对其方式(分散对齐)( 阅读全文

posted @ 2016-03-23 20:43 暴力的轮胎 阅读(525) 评论(0) 推荐(0) 编辑

2016年3月18日

关于linux下的.a文件与 .so 文件

摘要: 连续几天终于将一个又一个问题解决了,这里说其中一个问题 描述问题:使用多线程pthread的时候,(我用的IDE,CODEBOLCKS)编译后发现直接弹出窗口,程序还没有被Build。。巴拉巴拉,然后陷入了这个循环。提示有一句pthead_create未定义。 发现:pthread要用到动态链接库( 阅读全文

posted @ 2016-03-18 11:25 暴力的轮胎 阅读(38346) 评论(0) 推荐(3) 编辑

2016年3月7日

关于static函数在类中的定义和使用

摘要: 刷题的时候遇到了这样一个问题:平时经常使用 sort()函数, 对结构体进行排序, 但是在类中使用时会出现 这样的错误提示:“Solution::cmp”: 函数调用缺少参数列表;请使用“&Solution::cmp”创建指向成员的指针,试着将 cmp函数前加 static,也就是将比较函数定义成静 阅读全文

posted @ 2016-03-07 10:56 暴力的轮胎 阅读(2457) 评论(0) 推荐(0) 编辑

2016年2月24日

关于vector.size()和string.length() 的返回类型 size_type

摘要: 今天写循环的时候碰到一个问题,发现:string.length()返回的类型是size_type。它是unsigned 类型。string::size_type它在不同的机器上,长度是可以不同的,并非固定的长度。但只要你使用了这个类型,就使得你的程序适合这个机器。与实际机器匹配。 如果你的机器是32 阅读全文

posted @ 2016-02-24 23:09 暴力的轮胎 阅读(1814) 评论(0) 推荐(0) 编辑

2016年2月23日

内存地址对其方式

摘要: 面试的时候遇到了这样一个关于结构体大小的问题。今天突然想了想。 struct node{ int r;//4 byte char t1[2]; //sizeof node = 14 // char t1[3]; sizeof(node) = 20 char t2[10];//10 byte }; 这 阅读全文

posted @ 2016-02-23 10:31 暴力的轮胎 阅读(180) 评论(0) 推荐(0) 编辑

leetcode143. Reorder List

摘要: 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. For 阅读全文

posted @ 2016-02-23 02:55 暴力的轮胎 阅读(826) 评论(0) 推荐(0) 编辑

2015年9月29日

Leetcode03---Longest Substring Without Repeating Characters

摘要: Description:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeatin... 阅读全文

posted @ 2015-09-29 23:33 暴力的轮胎 阅读(144) 评论(0) 推荐(0) 编辑

【Leetcode 3】Longest Substring Without Repeating Characters0

摘要: Description: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeati 阅读全文

posted @ 2015-09-29 23:33 暴力的轮胎 阅读(143) 评论(0) 推荐(0) 编辑

2015年8月30日

Mac使用bootcamp安装win8.1出现网卡驱动没有安装问题

摘要: 问题:没有网络连接原因:在bootcamp烧的u盘里面其实附带了驱动,只是没有自动安装解决:D:\BootCamp\Drivers\Broadcom\BroadcomWirelessWin8x64 安装就好了。 阅读全文

posted @ 2015-08-30 23:47 暴力的轮胎 阅读(763) 评论(0) 推荐(0) 编辑

2015年8月13日

Github提交本地版本是遇到的问题

摘要: 问题如下:*** Please tell me who you are.Run git config --global user.email "you@example.com" git config --global user.name "Your Name"解决办法:进入本地项目路径下,找到.... 阅读全文

posted @ 2015-08-13 17:56 暴力的轮胎 阅读(280) 评论(0) 推荐(0) 编辑

导航