- 博客(15)
- 资源 (3)
- 收藏
- 关注
原创 韩国美女连连看核心算法
精选的韩国美女,看着一个个沉鱼落雁,闭月羞花之貌的美人,着实令人心神俱醉,目不暇接。“媚眼含羞合,丹唇逐笑开”,“俊眉修眼,顾盼神飞”,如此一个小游戏,却让你赏尽天下美人,岂不快哉。一饱眼福之余,也让人好奇这背后的逻辑。欲知背后的算法如何,且听我细细分析。大神说,talk is cheap, show me the code.这个世界是由代码构成的,一切基于co
2015-09-29 00:18:19 2205
原创 D3D11无双(0):DirectX11学习第一篇
之前买了本OpenGL的书,没看,现在却准备学习DirectX了。既然想学,就得选一个版本开始,我选择了DriectX11,也是听从前辈们的推荐。入门的书就首推这本——《Introduction_to_3D_Game_Programming_with_Directx_11》,然而,这本貌似没有中文版,至少我没找到。考虑的平时工作忙碌,英文读起来远远比中文慢,我内心有些纠结了。最后,我只能决定,硬着
2015-09-23 00:22:17 1439
原创 LeetCode284——Peeking Iterator新解
Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- it essentially peek() at the element that will be
2015-09-21 10:05:17 2767 4
原创 LeetCode283——Move Zeroes我的解法
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after calling you
2015-09-19 10:07:42 2820 3
原创 LeetCode275——H-Index II
Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm?实现:class Solution {public: int hIndex(vector& citations) { in
2015-09-17 10:14:58 1191
原创 LeetCode274——H-Index
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.According to the definition of h-index on Wikipedia: "A
2015-09-16 16:24:28 1005
原创 LeetCode279——Perfect Squares
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n =
2015-09-15 00:09:09 783
原创 LeetCode122——Best Time to Buy and Sell Stock II
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on
2015-09-12 23:44:21 463
原创 一个可以列出你所有博文浏览量的程序
CSDN blog官方只做出了浏览量前10篇的排行榜,有时候我们也好奇前20篇,前30篇的情况,或者那些文章是阅读量过万或过千的。没有找到一个方便的查看方式,于是乎就写了这么个程序,列出了所以文章,并按照浏览量进行从高到低排序。下面就是我的文章的阅读量:---------------------001 PageViews(29211) 时间复杂度和空间复杂度详解
2015-09-12 19:14:06 1199
原创 LeetCode3——Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo
2015-09-10 16:57:49 544
原创 LeetCode199——Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example:Given the following binary tree, 1
2015-09-10 16:09:43 569
原创 LeetCode200——Number of Islands
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assu
2015-09-09 23:13:46 1017
原创 LeetCode278——First Bad Version(二分查找+一个注意点)
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based on the
2015-09-09 09:44:39 5599 2
原创 科兴科学园简直是深圳游戏科技园
科兴科学园目前有3栋大厦(A,B,C),堪称世界级研发基地,C栋被腾讯租去,腾讯互娱在这里办公。大量游戏企业紧挨着腾讯扎堆,乐逗游戏、墨麟、第七大道搜狐畅游, 盖娅网络科技,冉斯等,Android平台Top10畅销游戏,腾讯占2个,创梦天地1个, 盖娅1一个,全在科兴科学园。我上家公司在B栋办公,做棋牌,可惜倒闭了。然而,腾讯的腾讯滨海大厦明天正式启用,那时腾讯互娱极有可能会搬
2015-09-07 00:47:02 33601
原创 LeetCode201——Bitwise AND of Numbers Range
Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4.Credits:Special thanks to @amrsaqr for adding this problem and creating all test cases.实现:class So
2015-09-05 00:38:18 569
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人