img

咖啡与代码

咖灰怪’s Blog

“当你发现自己的才华撑不起野心时,就请安静下来学习吧。”
LeetCode刷题之5:Longest Substring Without Repeating Characters(3)
2018-02-07 14:42    学习笔记 数据结构和算法    2176 阅读    0条回复

1. 题目 1.1 英文 Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb" , the answer is "abc" , which the length is 3. Given ...

LeetCode刷题之4:Valid Parentheses(20)
2018-02-06 14:42    学习笔记 数据结构和算法    2194 阅读    0条回复

1. 题目 1.1 英文 Given a string containing just the characters '(' , ')' , '{' , '}' , '[' and ']' , determine if the input string is valid. The brackets mu...

LeetCode刷题之3:Palindrome Number(9)
2018-02-01 17:01    学习笔记 数据结构和算法    2011 阅读    0条回复

1. 题目 1.1 英文 Determine whether an integer is a palindrome. Do this without extra space. Some hints : Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to s...

LeetCode刷题之2:Reverse Integer(7)
2018-01-25 15:41    学习笔记 数据结构和算法    2223 阅读    0条回复

1. 题目 Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we are dealing wi...

Go语言内置类型和函数
2018-01-24 17:34    学习笔记 Golang    2166 阅读    0条回复

Go语言中,有一些内置的类型和函数,不需要导入任何东西就可以使用,包括一些内置函数,初学Go,这些函数花几分钟记一记。 官方参考资料: Package builtin 1. 内置类型 Constants Variables type ComplexType type FloatType type IntegerType type Type type Type1 type bool type byt...

LeetCode刷题之1:Two Sum(1)
2018-01-24 14:17    学习笔记 数据结构和算法    2095 阅读    0条回复

准备定期刷一刷LeetCode上的题目,并且做一做笔记,这是第一篇。算法实现将采用Go语言。 1. 题目 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have...

数据结构的基本概念
2018-01-23 14:43    学习笔记 数据结构和算法    2621 阅读    0条回复

这是一篇数据结构的学习笔记,记录一下一些常见数据结构的概念。 1. 什么是数据结构 数据结构是以某种形式将数据组织在一起的集合,它不仅存储数据,还支持访问和处理数据的操作。 即:数据结构 = 数据存储 + 数据操作 2. 什么是算法 数据结构是数据存储的方式,而算法就是处理数据的方法,数据结构是数据存储的方式,而算法就是处理数据的方法。 3. 时间复杂度和空间复杂度 3.1 时间复杂度 算法的基本...

PHP正则表达式的应用
2017-07-13 14:35    学习笔记 PHP    2563 阅读    0条回复

关于PCRE的介绍以及实现正则表达式功能的所有说明,都可以在官方手册中看到: 正则表达式(兼容 Perl) 一 认识PCRE 1. 什么是PCRE PCRE 库是一个实现了与 perl 5 在语法和语义上略有差异的正则表达式模式匹配功能的函数集。 2. PCRE 库介绍 PCRE 是 PHP 核心扩展 ,所以总是启用的。 默认情况下,该扩展使用内置的 PCRE library。或者,也可以通过指定...

PHP
serialize序列化和json的比较
2017-01-05 11:21    学习笔记 PHP    1750 阅读    0条回复

关于将数据序列化存储这块,一直有一个疑问,就是serialize和json应该用哪一个更好。 参考了很多文章和讨论: Serialize or json in PHP? JSON vs. Serialized Array in database PHP的serialize序列化数据与JSON格式化数据 php的serialize序列化和json性能测试 总结一下: serialize解码比json...

咸鱼要翻身——未来我的学习计划
2016-09-30 16:08    学习笔记    1763 阅读    0条回复

现在的一个状况是,PHP懂个基础,可以独立开发一个后台,APP接口,进行数据库操作,写点简单js。但是,都是最基础的操作,用最简单的方式实现功能,没有太多性能啊之类上的考虑,以目前的知识也无法考虑到,毕竟接触编程也不久,所以现在急于提升自己。 虽然说,有些基础东西的东西也还没有彻底打扎实,但是总觉得这是一个过程,慢慢打就扎实了,所以还是觉得学点新技术比较好。但是问题来了,每当下班回到家坐在电脑前的...