上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2014-10-24 11:30 Agentgamer 阅读(120) 评论(0) 推荐(0)
摘要: 阅读顺序:http://www.laruence.com/2008/08/11/147.html 深入浅出phphttp://www.laruence.com/2008/06/18/221.html 深入理解php原理之opcodes... 阅读全文
posted @ 2014-08-16 22:58 Agentgamer 阅读(129) 评论(0) 推荐(0)
摘要: csapp page124. practice problem 2.35/* Determine whether arguments can be multiplied without overflow */int tmult_ok(int x, int y){ int p = x*y; ... 阅读全文
posted @ 2014-06-24 22:33 Agentgamer 阅读(1124) 评论(0) 推荐(2)
摘要: 折腾了半天,记录一下。先按照这个步骤安装mysql-python如果python setup.py install 时候出现clang 错误,运行 python -E setup.py install(参见)此时安装完成,import MySQLdb 的时候如果出现 image not found ... 阅读全文
posted @ 2014-06-05 16:11 Agentgamer 阅读(141) 评论(0) 推荐(0)
摘要: Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ... 阅读全文
posted @ 2014-04-28 17:25 Agentgamer 阅读(231) 评论(0) 推荐(0)
摘要: Implement pow(x,n).有史以来做过最简单的一题,大概用5分钟ac,我采用fast exponential,这个在sicp的第一章就有描述。思想是:如果n是偶数的话,那么m^n = (m^(n/2))^2, 如果n是奇数,那么m^n = m*m^(n-1)。这样一来是O(logn)的。... 阅读全文
posted @ 2014-04-28 16:59 Agentgamer 阅读(142) 评论(0) 推荐(0)
摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.在做Largest Rectangle in Histogram的... 阅读全文
posted @ 2014-04-27 22:35 Agentgamer 阅读(196) 评论(0) 推荐(0)
摘要: Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog... 阅读全文
posted @ 2014-04-25 21:50 Agentgamer 阅读(188) 评论(0) 推荐(0)
摘要: Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest... 阅读全文
posted @ 2014-04-23 21:27 Agentgamer 阅读(214) 评论(0) 推荐(0)
摘要: Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al... 阅读全文
posted @ 2014-04-23 14:48 Agentgamer 阅读(195) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 下一页