首页 > 其他
Container With Most Water
Two pointer, 一头一尾;brute force的话需要时间复杂度为O(n^2);但是two pointer的方法可以进行简化(通过对某些case的省略): 具体: height[low] = height[high]: 则知道 height[high]与任意height[low...
分类:其他   时间:2014-12-30 09:10:22    收藏:0  评论:0  赞:0  阅读:170
OJ刷题之《矩形转置》
题目描述 输入N*N的矩阵,输出它的转置矩阵。 输入 第一行为整数N(1≤N≤100)。 接着是一个N*N的矩阵。 输出 转置矩阵。 样例输入 2 1 2 1 2 样例输出 1 1 2 2 提示   代码如下: #include using namespace std; int main() { int N,i,j; int a[100][100...
分类:其他   时间:2014-12-30 08:08:22    收藏:0  评论:0  赞:0  阅读:261
LintCode-Unique Path II
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:其他   时间:2014-12-30 08:06:42    收藏:0  评论:0  赞:0  阅读:271
LintCode-Remove node in Binary Search Tree
Given a root of Binary Search Tree with unique value for each node. Remove the node with given value. If there is no such a node with given value in t...
分类:其他   时间:2014-12-30 08:06:22    收藏:0  评论:0  赞:0  阅读:484
cocos3 vector
先说Vector吧。如果说C++的vector容器怎么用,如果我说太多肯定一下子就暴露了我菜鸟的身份。所以呢,在这里不过多阐述,也请大神绕路。所以,还是回到Vector的使用问题上吧。该怎么用?既然Vector是替代了Array,那就拿Array 和Vector进行对比吧。下面我就以创建 Sprit...
分类:其他   时间:2014-12-30 08:06:12    收藏:0  评论:0  赞:0  阅读:281
LuaTinker的bug和缺陷
LuaTinker的bug和缺陷 LuaTinker是一套还不错的C++代码和Lua代码的绑定库,作者是韩国人Kwon-il Lee,作者应该是参考了LuaBind后,为了简化和避免过重而实现的。其官网在http://gpgstudy.com/gpgiki/LuaTinker ,但可惜全部是韩文的,而最新的代码可以在Git上下载,https://github.com/zupet/LuaTin...
分类:其他   时间:2014-12-30 07:04:42    收藏:0  评论:0  赞:0  阅读:347
关于一直卡死的两段代码,望对LDD3有兴趣者戳开这个blog : )
想来都有点恨自己,前几个月遇到的"难题".还是没有解决.一直卡死,又找不出原因. 吐个槽,那些只贴代码不附上运行结果的toturial, 我表示...我就不明白,既然有些bloger代码都给出来了 让我这种渣渣看一下肿么用的会怎么样?看一下你运行结果会怎么样? ------------------------------------------------ 问题代码一: /***...
分类:其他   时间:2014-12-30 07:04:32    收藏:0  评论:0  赞:0  阅读:300
Kafka源代码导入Scala IDE
折腾了一晚,终于在Scala IDE(Eclipse加Sacla插件了)下可以看Apache Kafka工程的源代码了。        我的环境是:win7 32位,Scala IDE:4.0.0,Apache Kafka:0.8.1.1(加了一个0.8.2版本里的gradlew.bat文件) Scala IDE下载好后,我就开始找Apache Kafka的源代码。刚开始一直用...
分类:其他   时间:2014-12-30 07:04:13    收藏:0  评论:0  赞:0  阅读:498
leetcode 171: Excel Sheet Column Number
Excel Sheet Column Number Total Accepted: 1643 Total Submissions: 3860 Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its correspondin...
分类:其他   时间:2014-12-30 07:04:06    收藏:0  评论:0  赞:0  阅读:1003
leetcode 160: Intersection of Two Linked Lists
Intersection of Two Linked Lists Total Accepted: 8676 Total Submissions: 32571 Write a program to find the node at which the intersection of two singly linked lists begins. For example, the...
分类:其他   时间:2014-12-30 07:04:05    收藏:0  评论:0  赞:0  阅读:323
leetcode 153: Find Minimum in Rotated Sorted Array
Find Minimum in Rotated Sorted Array Total Accepted: 21207 Total Submissions: 65855 Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might bec...
分类:其他   时间:2014-12-30 07:03:22    收藏:0  评论:0  赞:0  阅读:317
新浪微博数据挖掘菜谱之三: 搜索篇 (selenium)
新浪微博数据挖掘菜谱之三: 搜索篇 (selenium)...
分类:其他   时间:2014-12-30 07:03:12    收藏:0  评论:0  赞:0  阅读:433
OS X 下iso刻录U盘
1. 查看盘$diskutil list/dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme ...
分类:其他   时间:2014-12-30 07:02:22    收藏:0  评论:0  赞:0  阅读:398
LintCode-Sort Colors II
Given an array ofnobjects with k different colors (numbered from 1 to k), sort them so that objects of the same color are adjacent, with the colors in...
分类:其他   时间:2014-12-30 07:02:12    收藏:0  评论:0  赞:0  阅读:302
[leetcod] Clone Graph
题目:Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled u...
分类:其他   时间:2014-12-30 07:01:22    收藏:0  评论:0  赞:0  阅读:381
LintCode-Search 2D Matrix II
Write an efficient algorithm that searches for a value in an m x n matrix, return the occurrence of it.This matrix has the following properties: * In....
分类:其他   时间:2014-12-30 07:01:12    收藏:0  评论:0  赞:0  阅读:447
加州大学伯克利分校Stat2.2x Probability 概率初步学习笔记: Section 4 The Central Limit Theorem
Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授。PDF笔记下载(Academia.edu)SummaryStandard Error The standard error o...
分类:其他   时间:2014-12-30 07:00:42    收藏:0  评论:0  赞:0  阅读:452
[LeetCode#2]Add Two Numbers
The question:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices ...
分类:其他   时间:2014-12-30 07:00:02    收藏:0  评论:0  赞:0  阅读:306
当你学了现在的忘了前面的
我怀疑我的智商应该不是很高,要不然我也不会学的如此狼狈。虽然我总是能很好的理解现在所学的知识点,但是我就是记不住,当下次再次需要上次的知识点来解决问题的时候,我总是忘的差不多了,要不就是没把握和对不对的问题。 我的学习方法就是老师讲的时候听,一般来说我的理解能力还可以,老师讲的也可以的话,我能很好的...
分类:其他   时间:2014-12-30 06:59:22    收藏:0  评论:0  赞:0  阅读:266
[LeetCode#1] Two Sum
The Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices o...
分类:其他   时间:2014-12-30 06:58:42    收藏:0  评论:0  赞:0  阅读:334
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!