- 博客(22)
- 收藏
- 关注
原创 【LeetCode】459. Repeated Substring Pattern 解题报告(Java & Python)
[LeetCode]https://leetcode.com/problems/repeated-substring-pattern/Difficulty: EasyQuestion Given a non-empty string check if it can be constructed by taking a substring of it and appending multipl
2017-01-15 21:34:48 3274
原创 【LeetCode】476. 数字的补数 Number Complement
[LeetCode]https://leetcode.com/problems/number-complement/Difficulty: EasyQuestion Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary
2017-01-15 15:03:37 2833 2
原创 【LeetCode】485. Max Consecutive Ones 解题报告(Java & Python)
[LeetCode]https://leetcode.com/problems/max-consecutive-ones/Difficulty: EasyQuestion Given a binary array, find the maximum number of consecutive 1s in this array.NoteThe input array will only c
2017-01-15 14:36:27 1872
原创 【LeetCode】405. Convert a Number to Hexadecimal 解题报告(Java & Python)
[LeetCode]https://leetcode.com/problems/convert-a-number-to-hexadecimal/Difficulty: EasyQuestion Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s compl
2017-01-14 14:39:16 2197
原创 【LeetCode】415. Add Strings 字符串相加
给定两个字符串形式的非负整数 `num1` 和 `num2` ,计算它们的和并同样以字符串形式返回。你不能使用任何內建的用于处理大整数的库(比如 `BigInteger` ), 也不能直接将输入的字符串转换为整数形式。
2017-01-12 18:51:50 2397
原创 【LeetCode】447. Number of Boomerangs 解题报告(Java & Python)
[LeetCode]https://leetcode.com/problems/number-of-boomerangs/Difficulty: EasyQuestion Given n points in the plane that are all pairwise distinct, a “boomerang” is a tuple of points (i, j, k) such t
2017-01-12 16:40:26 1345
原创 【LeetCode】401. Binary Watch 解题报告(Java & Python)
[LeetCode]https://leetcode.com/problems/binary-watch/Difficulty: EasyQuestion A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represen...
2017-01-11 15:36:29 1861
原创 【LeetCode】350. Intersection of Two Arrays II 解题报告(Java & Python)
[LeetCode]https://leetcode.com/problems/intersection-of-two-arrays-ii/Difficulty: EasyQuestion Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1],
2017-01-11 11:27:22 2309
原创 【Android开发】问答机器人,聊天类App的开发制作过程记录
缘起很久没写项目了,所以单纯的想练练手,正好看到有问答机器人的接口,想到之前也做过聊天项目,为什么不实验一下呢。当然也是简单调用接口的项目,并没有真正的完成问答的算法等等。业余项目,功能不齐全,只实现了简单的问答部分,至于聊天界面等等我懒得把之前的项目代码复制一份,因此忽略了。研究首先,我用的问答机器人的接口仍然还是聚合数据开放的免费接口,网址是:https://www.juhe.cn/docs/a
2017-01-10 17:30:23 3828 4
原创 【LeetCode】409. Longest Palindrome 解题报告(Python & C++)
【LeetCode】Longest Palindrome 解题报告标签(空格分隔): LeetCode[LeetCode]https://leetcode.com/problems/longest-palindrome/Difficulty: EasyQuestion Given a string which consists of lowercase or uppercase letter
2017-01-08 20:34:24 1879
原创 【LeetCode】349. Intersection of Two Arrays 解题报告(Java & Python)
【LeetCode】Intersection of Two Arrays 解题报告标签(空格分隔): LeetCode[LeetCode]https://leetcode.com/problems/intersection-of-two-arrays/Difficulty: EasyQuestion Given two arrays, write a function to compute
2017-01-08 19:18:57 1284
原创 Python 图片转字符画 学习笔记
Python 图片转字符画 学习笔记标签(空格分隔): Python声明:此文章和所有代码是学习笔记,非原创,原文教程地址:https://www.shiyanlou.com/courses/370/labs/1191/document实验楼我感觉挺好的,但为了保存自己的代码,我是在自己本地电脑敲的代码,并且改造了一下。这个教程是说如何把一个图片转化为字符画。 可以直接运行的代码如下:from P
2017-01-07 23:16:40 1264
原创 【LeetCode】404. Sum of Left Leaves 解题报告(Python)
【LeetCode】Sum of Left Leaves 解题报告标签(空格分隔): LeetCode[LeetCode]https://leetcode.com/problems/sum-of-left-leaves/Difficulty: EasyQuestion Find the sum of all left leaves in a given binary tree.Exampl
2017-01-07 22:08:04 1380 1
原创 【LeetCode】383. Ransom Note 赎金信
为了不在赎金信中暴露字迹,从杂志上搜索各个需要的字母,组成单词来表达意思。给你一个赎金信 (ransomNote) 字符串和一个杂志(magazine)字符串,判断 ransomNote 能不能由 magazines 里面的字符构成。如果可以构成,返回 true ;否则返回 false 。magazine 中的每个字符只能在 ransomNote 中使用一次。
2017-01-07 21:37:06 1238
原创 【LeetCode】453. Minimum Moves to Equal Array Elements 解题报告(Java & Python & C++)
【LeetCode】Minimum Moves to Equal Array Elements 解题报告标签(空格分隔): LeetCode[LeetCode]https://leetcode.com/problems/minimum-moves-to-equal-array-elements/Difficulty: EasyQuestion Given a non-empty intege
2017-01-07 20:52:55 1776
原创 【LeetCode】455. Assign Cookies 解题报告(Java & Python)
【LeetCode】Assign Cookies 解题报告[LeetCode]https://leetcode.com/problems/assign-cookies/Difficulty: EasyQuestion Assume you are an awesome parent and want to give your children some cookies. But, you s
2017-01-07 20:09:56 1725
原创 【LeetCode】389. Find the Difference 解题报告(Java & Python)
【LeetCode】Find the Difference 解题报告[LeetCode]https://leetcode.com/problems/find-the-difference/Difficulty: EasyQuestion Given two strings s and t which consist of only lowercase letters. String
2017-01-07 15:21:21 1197
原创 【LeetCode】136. Single Number 解题报告(Java & Python)
【LeetCode】Single Number 解题报告(Java & Python)[LeetCode]https://leetcode.com/problems/single-number/Total Accepted: 183838Total Submissions: 348610Difficulty: EasyQuestion Given an ...
2017-01-07 14:17:03 1403
原创 【LeetCode】Island Perimeter 解题报告
【LeetCode】Island Perimeter 解题报告[LeetCode]https://leetcode.com/problems/island-perimeter/Total Accepted: 16143Total Submissions: 28552Difficulty: EasyQuestion You are given a map in form of a two-
2017-01-06 16:30:50 609
原创 【LeetCode】461. Hamming Distance 解题报告(java & python)
【LeetCode】Hamming Distance 解题报告(java & python)[LeetCode]https://leetcode.com/problems/hamming-distance/Total Accepted: 12155Total Submissions: 16696Difficulty: EasyQuestion The H...
2017-01-06 15:23:46 2131
原创 【LeetCode】448. Find All Numbers Disappeared in an Array 解题报告(Python)
【LeetCode】Fizz Buzz 解题报告[LeetCode]https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/Total Accepted: 14302Total Submissions: 24993Difficulty: EasyQuestion Given an array of in
2017-01-02 18:57:09 2353 5
原创 【LeetCode】412. Fizz Buzz 解题报告(Python)
【LeetCode】Fizz Buzz 解题报告[LeetCode]https://leetcode.com/problems/fizz-buzz/Total Accepted: 31093Total Submissions: 53272Difficulty: EasyQuestion Write a program that outputs the string representat
2017-01-02 17:58:48 2086
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人