- 博客(24)
- 收藏
- 关注
原创 边学边写flutter
写在前面第一次接触flutter在18年的时候,那时候的flutter还像个刚出生的婴儿,无论是SDK还是社区的支持都不是很完善。经过两年时间,社区博客,和各大公司都开始关注flutter,可以明显的感觉flutter真正火起来了,于是产考了Android_zhu_jiang的《历时三天,完成了Flutter版本的玩安卓》项目,自己边学边写花了一周时间写完了自己的第一个flutter项目,因为...
2020-04-12 13:23:44
229
1
原创 15. 3Sum
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set must not contain ...
2018-05-22 17:23:16
158
原创 14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: ["flower","flow","flight"]Output: "fl"E...
2018-05-16 15:28:06
159
原创 13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D 5...
2018-05-16 14:57:57
186
原创 12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D 5...
2018-05-15 17:13:12
162
原创 11. Container With Most Water
原题Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find ...
2018-05-15 15:41:57
159
原创 10. Regular Expression Matching
Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The...
2018-05-11 13:05:26
469
原创 9. Palindrome Number
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExplanation: F...
2018-05-10 17:07:53
167
原创 8. String to Integer (atoi)
Implement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this ...
2018-05-10 16:09:53
207
原创 7. Reverse Integer
Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dealing with an envir...
2018-05-10 14:58:37
113
原创 6. ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I I G...
2018-05-10 14:47:38
129
原创 5. Longest Palindromic Substring (二)
5. Longest Palindromic SubstringGiven a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: "babad"Output: "bab"Note: "ab...
2018-05-10 13:15:26
135
原创 5. Longest Palindromic Substring (一)
5. Longest Palindromic SubstringGiven a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: "babad"Output: "bab"Note: "ab...
2018-05-10 12:24:54
145
原创 Python学习笔记(6)字典、元组、列表
1.字典 Python内置了字典的支持,也就是java中的map。使用键-值对(Key,Value)的形式存储数据,其中Key必须是唯一的,而value值可以重复出现,Key的类型必须是不可变的,如数字、字符串。元组,而Value可以是任何类型,如列表,字典,字符串等。 和list对比优点是能够极快的查询到value,而缺点是暂用较多的内存 举个栗子:使用字典,获取人的年龄,只需...
2018-04-23 16:54:02
190
原创 Python学习笔记(5)条件判断和循环结构
1.Python条件结构python目前的条件结构只有if else 一种,暂时还不支持类似java的switch case 结构,具体原因请参考官方说明官方建议采用 当有多分支时采用 if elif elif... else 的结构,当条件分支过多时,建议采用字典结构,映射到函数中。def function_1(...): ...functions = {'a': funct...
2018-04-19 14:55:03
1040
原创 4. Median of Two Sorted Arrays(一)
题目来源https://leetcode.com/problems/median-of-two-sorted-arrays/description/给出两个有序数组,找到两个数组的中位数。解题思路,先不去考虑时间复杂度,时间需求才是第一要务不是?如果这样最简单的做法就是先将两个有序数组合并成一个有序数组,之后计算时间复杂度就简单了,那么开始撸码吧。fun findMedianSortedArray...
2018-04-19 13:46:57
156
原创 3. Longest Substring Without Repeating Characters
题目来源https://leetcode.com/problems/longest-substring-without-repeating-characters/description/给定一个字符串,找出最长非重复字符串解题思路,比较耿直一点的写法,循环每一个字节,并用一个变量接受,直到遇到重复的字节,与上一次的进行长度对比,记录下较大的一个长度。fun lengthOfLo
2018-01-23 16:03:45
156
原创 2. Add Two Numbers
题目来源https://leetcode.com/problems/add-two-numbers/description/给你两个非空链表,表示两个非负整数,这些数字以相反的顺序存储,每个节点包含一个数字,添加两个数字并将其作为一个链表返回。你可以假设这两个数字不包含任何前导零,除了数字0本身。解题思路,还是一样的先解题,不是最优解和没有解出来差距可是比最优解和不
2018-01-23 14:58:46
158
原创 1.Two Sum
题目来源https://leetcode.com/problems/two-sum/description/给定一个数字,输入一个目标值,假设这个目标值等于数组中两个数相加,并且数组中的数字不重复。找到数字中两个数相加等于目标值的数,并返回索引。解题思路,最容易想到的是两层循环,找到两个相加等于目标值的数,实际开发中第一目标就是实现需求,那么我们就先把这个需求实现一下。fu
2018-01-23 13:26:43
199
原创 Python学习笔记(4)操作符
1.算术运算符: java的算术运算符有+ - * / % ++ -- python的算术运算符有 + - * / % // ** 其中 + - * / 和java都是一样,分别是 数学运算中的加减乘除和取模,不同的是python没有++ --两个算术运算符进行自增和自减,而多了// **,下面我们来看看//和**分别是什么意思。我们在python中分别执行下面两
2018-01-22 16:09:05
384
原创 Python学习笔记(3)强类型静态语言
强类型、弱类型 什么是强类型语言,什么是弱类型语言1)强类型:java就是强类型语言,强类型语言是什么呢?我们通过java来分析,就是定义了这个变量的类型之后,不经过类型的转换,这个类型就不会发生改变。由此分析python也是属于强类型语言。2)弱类型:JavaScript就是弱类型语言弱类型语言和强类型语言正好相反,变量赋值之后,任然可以被赋予其他类型的值。但
2018-01-19 20:19:40
600
原创 Python学习笔记(2)数据类型
总算是开始进入正题了,在这章对比下java和python的数据类型,本系列参考http://python.usyiyi.cn/translate/python_352/index.html,若内容涉及任何侵权行为,请联系我立刻删除。数据类型 我将java的八大基本类型分为三类,文本类,逻辑类,和数字类,而python中不存在基本类型,python将有所事物都看做为对象,python的变量是不存在类
2018-01-19 16:09:14
394
原创 Python学习笔记(1)Python安装
下载 从python的官网https://www.python.org/downloads/下载Python的安装程序,需要注意的是,Python2.X和3.X的语法结构改动很大,根据自己的需要选择下载不同的版本。安装 下载好安装文件之后,直接运行,记得勾选将 Add Pyhton 3.6 to PATH,也就是自动配置python的环境变量,然后直接安装即可。 如果忘记勾选Add Pyhton
2018-01-18 17:12:50
238
原创 Python学习笔记(0)前言
最近有点闲,想着是不是学点什么呢,最近听的比较多的Python和Go最终选择下来还是先学学Python。选择Python的原因也是容易上手,这样更容易坚持下来,Python的运用也非常广泛,在平时工作也能写一些有意思的小玩意。Pyhton简介 那么Python是什么呢?python和java(原谅我用java做对比,因为平时就是用java开发,所以只对java比较熟悉一点)一样都是面向对象编程的一
2018-01-18 13:38:43
293
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人