上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 29 下一页
摘要: 最近做教研室的项目,需要只能存在一个接收数据的线程,那么我就想把这个线程设置成一个静态对象。但是在connect信号与槽的时候出了一点问题,最后搞好了,现在这mark一下:比如说一个声明了一个静态的thread以及一个成员Thread的话: 1 class A{ 2 private: 3 T... 阅读全文
posted @ 2015-11-11 16:10 eversliver 阅读(1515) 评论(0) 推荐(0) 编辑
摘要: Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon... 阅读全文
posted @ 2015-11-11 14:53 eversliver 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-bit in... 阅读全文
posted @ 2015-11-10 22:55 eversliver 阅读(260) 评论(0) 推荐(0) 编辑
摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2... 阅读全文
posted @ 2015-11-10 17:16 eversliver 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ... 阅读全文
posted @ 2015-11-09 17:30 eversliver 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 程序中有时候会遇到这种情况,就是需要不停的去分配以及释放内存。带来的是不停的调用new以及delete带来的开销。而且由于全局的new以及delete往往对多线程做出了并发保护,所以在单线程情况下这更带来一种浪费,一般的情况下是去实现一个单线程的内存池来进行性能优化,配合所需的类往往带来很好的性能提... 阅读全文
posted @ 2015-11-09 16:56 eversliver 阅读(526) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted in asc... 阅读全文
posted @ 2015-11-08 21:55 eversliver 阅读(305) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2015-11-06 22:51 eversliver 阅读(392) 评论(0) 推荐(0) 编辑
摘要: Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], ["na... 阅读全文
posted @ 2015-11-06 17:57 eversliver 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.额,当然我用的就是暴力搜索来,没用到KMP之类的算法... 阅读全文
posted @ 2015-11-06 16:48 eversliver 阅读(318) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 29 下一页