算法&数据结构
文章平均质量分 50
jfson_土豆
挖土豆
展开
-
算法基础知识
算法的复杂度 算法的复杂度: 算法的时间复杂度和空间复杂度合称为算法的复杂度,一般不特别说明,讨论的时间复杂度均是最坏情况下的时间复杂度。 用于描述时间复杂度&空间复杂度的公式关键字 Big-O 时间复杂度:执行程序所需的时间。可以估算出程序对处理器的使用程度。一般用内层代码语句执行次数来统计 空间复杂度:执行程序所需的存储空间。可以估算出程序对计算机内存的使用程度,就是在运行过程中临时占用存储空间原创 2017-12-19 23:52:17 · 319 阅读 · 0 评论 -
1. Two Sum
1.题目(LeetCode | 1 | easy):Two Sum 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 exactly one solution原创 2017-12-24 22:56:15 · 223 阅读 · 0 评论 -
2.Reverse Integer
1.题目(LeetCode | 7 | easy):Reverse Integer Given a 32-bit signed integer, reverse digits of an integer. 给定一个32位有符号整数,求整数的反转数字。 Example: 例1: 输入: 123 输出: 321 例2: 输入: -123 输出: -321 例3: 输入: 120 输出:原创 2017-12-24 22:57:09 · 224 阅读 · 0 评论