- 博客(7)
- 资源 (3)
- 收藏
- 关注
原创 程序员的算法趣题 python3 - (4)
注:以下题目来自《程序员的算法趣题》– [日]增井敏克著,原书解法主要用Ruby实现,最近在学Python,随便找点东西写写当做练习,准备改成Python3实现,顺便增加一些自己的理解。16.三根绳子折成四边形三根绳子折成3个四边形,一根摆成正方形,两根摆成长方形,会出现长方形面积之和等于正方形面积的情况,如: 绳子长度25, 1*9 = 9 2*8 = 16 5*5 = 25...
2018-06-24 14:13:52 543
原创 leetcode practice - python3 (15)
34. Search for a RangeGiven an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.Your algorithm’s runtime complexity must be in the or...
2018-06-23 20:28:49 312
原创 leetcode practice - python3 (14)
621. Task SchedulerDescriptionHintsSubmissionsDiscussSolution Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different ta...
2018-06-10 19:53:48 273
原创 程序员的算法趣题 python3 - (3)
注:以下题目来自《程序员的算法趣题》– [日]增井敏克著,原书解法主要用Ruby实现,最近在学Python,随便找点东西写写当做练习,准备改成Python3实现,顺便增加一些自己的理解。11.斐伯那契数列1, 1, 2, 3, 5, 8… 求前13个满足x % (x各位数的和) == 0的斐波那契数 如: 2 % 2 == 0 21 % 3 == 0 144 % 9 == 0...
2018-06-04 22:49:00 1042
原创 leetcode practice - python3 (13)
560. Subarray Sum Equals KDescriptionHintsSubmissionsDiscussSolution Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.E...
2018-06-04 19:45:23 257
原创 leetcode practice - python3 (12)
236. Lowest Common Ancestor of a Binary TreeDescriptionHintsSubmissionsDiscussSolution Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the d...
2018-06-03 14:42:32 300
原创 leetcode practice - python3 (11)
198. House RobberDescriptionHintsSubmissionsDiscussSolution You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constrain...
2018-06-03 14:08:56 281
Qt 真三装备连连看
2012-12-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人