8 ojshilu

尚未进行身份认证

https://github.com/lucky521

等级
博文 322
排名 4k+

Euler: Integer right triangles

Ifpistheperimeterofarightangletrianglewithintegrallengthsides,{a,b,c},thereareexactlythreesolutionsforp=120.{20,48,52},{24,45,51},{30,40,50}p是三边长度均为整数的直角三角形的周长,当p=120时,存在三种直角三

2015-05-13 20:27:41

学习JavaScript的闭包

从外部访问函数局部变量变量有局部变量和全局变量。对于函数的局部变量,在函数内部可以访问,在函数外部无法访问。对于全局变量,在函数内部和外部都可以访问。闭包是什么?Javascript允许在函数中定义内部函数,将内部函数返回,这时候会产生闭包。闭包中含有一种特殊的局部变量,在函数结束返回后仍然存在。闭包中的局部变量是引用而不是拷贝。返回内部函数functionmakeFunc(){v

2015-05-12 21:36:15

Leetcode: Department Highest Salary

TheEmployeetableholdsallemployees.EveryemployeehasanId,asalary,andthereisalsoacolumnforthedepartmentId.+—-+——-+——–+————–+|Id|Name|Salary|DepartmentId|+—-+——-+——–+————

2015-03-19 18:10:41

Euler: Non-abundant sums

ProblemAperfectnumberisanumberforwhichthesumofitsproperdivisorsisexactlyequaltothenumber.Forexample,thesumoftheproperdivisorsof28wouldbe1+2+4+7+14=28,whichme

2015-03-18 23:05:45

Leetcode: Rank Scores

WriteaSQLquerytorankscores.Ifthereisatiebetweentwoscores,bothshouldhavethesameranking.Notethatafteratie,thenextrankingnumbershouldbethenextconsecutiveintegervalue.I

2015-03-18 21:59:05

Leetcode: Consecutive Numbers

WriteaSQLquerytofindallnumbersthatappearatleastthreetimesconsecutively.+—-+—–+|Id|Num|+—-+—–+|1|1||2|1||3|1||4|2||5|1||6|2|

2015-03-16 22:20:32

Leetcode : Customers Who Never Order

Nowwe’vegottwotable.Onecustomertableforcustomeridandtheirnames,OneOrdertableforcustomers’Idthatboughtsomething.Wewillfindthecustomersthatinthecustomertablebutnotinord

2015-03-15 22:43:40

Leetcode: find all duplicate

Leetcode:DuplicateEmailsWriteaSQLquerytofindallduplicateemailsinatablenamedPerson.+—-+———+|Id|Email|+—-+———+|1|a@b.com||2|c@d.com||3|a@b.com|+—-+———+

2015-03-15 22:27:45

Leetcode: 相关子查询

Leetcode:EmployeesEarningMoreThanTheirManagers+—-+——-+——–+———–+|Id|Name|Salary|ManagerId|+—-+——-+——–+———–+|1|Joe|70000|3||2|Henry|80000|4|

2015-03-14 19:01:44

Leetcode: Second Highest Salary

WriteaSQLquerytogetthesecondhighestsalaryfromtheEmployeetable.+—-+——–+|Id|Salary|+—-+——–+|1|100||2|200||3|300|+—-+——–+Forexample,giventheabov

2015-03-14 00:00:58

Euler: Digit fifth powers

Problem30:Surprisinglythereareonlythreenumbersthatcanbewrittenasthesumoffourthpowersoftheirdigits:1634=1^4+6^4+3^4+4^48208=8^4+2^4+0^4+8^49474=9^4+4^4+7^4

2015-03-12 19:54:15

Euler: Counting Sundays

Problem19.Youaregiventhefollowinginformation,butyoumayprefertodosomeresearchforyourself.1Jan1900wasaMonday.ThirtydayshasSeptember,April,JuneandNovember.Alltheresthav

2015-03-11 21:07:22

Euler: Names scores

Problem22:Usingnames.txt,a46Ktextfilecontainingoverfive-thousandfirstnames,beginbysortingitintoalphabeticalorder.Thenworkingoutthealphabeticalvalueforeachname,multiplythis

2015-03-10 22:51:31

Euler: Amicable numbers

AmicablenumbersThisisthe21stissueofEulerProjectChallengeGame.Letd(n)bedefinedasthesumofproperdivisorsofn(numberslessthannwhichdivideevenlyinton).

2015-03-09 19:03:21

Leetcode:Excel Sheet Column Number

Leetcode增加了AcceptedSolutionsRuntimeDistribution,能够看到自己的代码的效率和别人比起来在怎么样的位子。CSDN博客终于推出了Markdown格式写博客。

2015-03-09 17:27:30

数组的最大子数组积 Maximum Product Subarray

题目:Findthecontiguoussubarraywithinanarray(containingatleastonenumber)whichhasthelargestproduct.Forexample,giventhearray [2,3,-2,4],thecontiguoussubarray [2,3] hasthelarge

2014-10-20 10:40:24

寻找循环有序数组的最小值 Find Minimum in Rotated Sorted Array

二分查找是典型的分治思想,主要应用于有序顺组相关的查找问题。典型

2014-10-20 10:14:02

Hadoop系统的守护进程

Hadoop系统在启动有有五个重要的JVM进程,分别是

2014-09-19 16:40:21

看看进程、线程的父子关系

主线程调用pthread_join来等待子线程的结束,然后去ch

2014-09-16 18:52:01

printf趣味程序

下面这个单行程序里包含了不少知识:main(){printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}1:unix默认值main(){printf(“%d”,unix);}2:数组表示法数组的表示法:str[n] 等价于 (n)[str],等价于str+n,就

2014-08-29 13:48:17
奖章
  • 专栏达人
    专栏达人
    授予成功创建个人博客专栏的用户。专栏中添加五篇以上博文即可点亮!撰写博客专栏浓缩技术精华,专栏达人就是你!