232 Implement Queue using Stacks
题目 Implement Queue using Stacks
题目 Implement Queue using Stacks
题目 Min Stack
题目 Linked List Cycle II
题目 Intersection of Two Linked Lists
题目 Palindrome Linked List
题目 Add Two Numbers II
题目 Partition List
题目 Delete Node in a Linked List
题目 Remove Nth Node From End of List
题目 Rotate String
题目 Set Matrix Zeroes
题目 Rotate Image
题目 Edit Distance
题目 Escape The Ghosts
题目 Remove Duplicate Letters
题目 Score of Parentheses
背景 为了确保软件能够使用正确的文件进行工作,开发团队在软件中实现了一个文件校验功能。其处理流程如下图所示。
Problem 292 Nim Game
Problem 226 Invert Binary Tree
Problem 100 Same Tree
题目 886 Possible Bipartition
题目 717 1-bit and 2-bit Characters
题目 63 Unique Paths II
题目 554 Brick Wall
题目 538 Convert BST to Greater Tree
题目 463 Island Perimeter
题目 45 Jump Game II
题目 41 First Missing Positive/
题目 4 Median of Two Sorted Arrays
题目 394 Decode String
题目 390 Elimination Game
题目 372 Super Pow
题目 315 Count of Smaller Numbers After Self
题目 312 Burst Balloons
题目 217 Contains Duplicate
题目 207 Course Schedule
题目 2 Add Two Numbers
题目 189 Rotate Array
题目 136 Single Number
题目 135 Candy
题目 123 Best Time to Buy and Sell Stock III
题目 106 Construct Binary Tree from Inorder and Postorder Traversal
题目 105 Construct Binary Tree from Preorder and Inorder Traversal
题目 103 Binary Tree Zigzag Level Order Traversal
题目 1 Two Sum
题目 Implement Queue using Stacks
题目 Min Stack
题目 Linked List Cycle II
题目 Intersection of Two Linked Lists
题目 Palindrome Linked List
题目 Add Two Numbers II
题目 Partition List
题目 Delete Node in a Linked List
题目 Remove Nth Node From End of List
题目 Rotate String
题目 Set Matrix Zeroes
题目 Rotate Image
题目 Edit Distance
题目 Escape The Ghosts
题目 Remove Duplicate Letters
题目 Score of Parentheses
Problem 292 Nim Game
Problem 226 Invert Binary Tree
Problem 100 Same Tree
题目 886 Possible Bipartition
题目 717 1-bit and 2-bit Characters
题目 63 Unique Paths II
题目 554 Brick Wall
题目 538 Convert BST to Greater Tree
题目 463 Island Perimeter
题目 45 Jump Game II
题目 41 First Missing Positive/
题目 4 Median of Two Sorted Arrays
题目 394 Decode String
题目 390 Elimination Game
题目 372 Super Pow
题目 315 Count of Smaller Numbers After Self
题目 312 Burst Balloons
题目 217 Contains Duplicate
题目 207 Course Schedule
题目 2 Add Two Numbers
题目 189 Rotate Array
题目 136 Single Number
题目 135 Candy
题目 123 Best Time to Buy and Sell Stock III
题目 106 Construct Binary Tree from Inorder and Postorder Traversal
题目 105 Construct Binary Tree from Preorder and Inorder Traversal
题目 103 Binary Tree Zigzag Level Order Traversal
题目 1 Two Sum
公司里有一批祖传脚本,代码写得又长又臭,领导让你重构。既然要重构,就难免要修改代码中的变量和函数,但是Shell语言目前并没有IDE之类的工具,没办法进行代码智能重构,所以我们在重构变量/函数的时候不能自动地把相关的引用代码一起修改掉,怎么办呢?
移动光标 基本移动操作
Vim基础 Vim是一个通过命令进行交互并且区分模式的编辑器,理解这一点是用好Vim的基础。
什么是文件 文件(file) 是一个有名字的源(source),可以从中读取数据 又或者是一个有名字的目标(target),可以向其中写入数据
Notation 命令行语法表示法
基本概念 数据库(Database): 经过组织的数据集合 数据库管理系统(Database Management System, DBMS): 用于管理数据库的软件 关系数据库(Relational Database): 直观上来说,就是以表格结构管理数据的数据库 结构化查询语言(Struct...
事务 事务(transaction),指作为一个整体执行的数据库操作序列。
操作系统简介 操作系统是什么:操作硬件,并为其他所有软件提供运行环境的软件。操作系统运行在裸机上。
进程 由于对操作系统多任务处理的需求,出现了进程的抽象概念 进程是对运行中的程序的抽象 线程 由于进程的粒度太大,为了进行更细粒度的控制,出现了线程的概念 线程指程序中的一个指令执行序列,此时进程退化为线程和硬件资源的容器 线程的出现实际上是代码执行(线程)与资源分配(进程)相分离的体现
为什么需要算法分析? 在求解问题时,我们既需要得到正确的答案(正确性),也需要尽可能快地完成求解(性能)。一个正确的但运行时间极长的程序是不切实际的,我们真正需要的是正确且高效的程序。通过算法分析,我们可以找到程序的性能瓶颈并对程序进行性能优化。
算法(algorithm)是由定义清晰的计算步骤所组成的操作序列。一旦我们确认了某个算法的正确性,接下来极其重要的一步就是分析它的运行时间和需要使用的空间资源。
考虑以下计算斐波那契数的递归程序 public static long fib(int n) { if (n <= 1) return 1; else return fib(n - 1) + fib(n - 2); }
问题 给定整数\(A_1, A_2, ..., A_N,\)求\(\sum_{k=i}^{j}A_k\)的最大值,其中\(A_i\)有可能是负数。这里把使得\(\sum_{k=i}^{j}A_k\)最大的序列称为最大连续子序列。
为什么需要算法分析? 在求解问题时,我们既需要得到正确的答案(正确性),也需要尽可能快地完成求解(性能)。一个正确的但运行时间极长的程序是不切实际的,我们真正需要的是正确且高效的程序。通过算法分析,我们可以找到程序的性能瓶颈并对程序进行性能优化。
算法(algorithm)是由定义清晰的计算步骤所组成的操作序列。一旦我们确认了某个算法的正确性,接下来极其重要的一步就是分析它的运行时间和需要使用的空间资源。
考虑以下计算斐波那契数的递归程序 public static long fib(int n) { if (n <= 1) return 1; else return fib(n - 1) + fib(n - 2); }
问题 给定整数\(A_1, A_2, ..., A_N,\)求\(\sum_{k=i}^{j}A_k\)的最大值,其中\(A_i\)有可能是负数。这里把使得\(\sum_{k=i}^{j}A_k\)最大的序列称为最大连续子序列。
公司里有一批祖传脚本,代码写得又长又臭,领导让你重构。既然要重构,就难免要修改代码中的变量和函数,但是Shell语言目前并没有IDE之类的工具,没办法进行代码智能重构,所以我们在重构变量/函数的时候不能自动地把相关的引用代码一起修改掉,怎么办呢?
移动光标 基本移动操作
Vim基础 Vim是一个通过命令进行交互并且区分模式的编辑器,理解这一点是用好Vim的基础。
操作系统简介 操作系统是什么:操作硬件,并为其他所有软件提供运行环境的软件。操作系统运行在裸机上。
进程 由于对操作系统多任务处理的需求,出现了进程的抽象概念 进程是对运行中的程序的抽象 线程 由于进程的粒度太大,为了进行更细粒度的控制,出现了线程的概念 线程指程序中的一个指令执行序列,此时进程退化为线程和硬件资源的容器 线程的出现实际上是代码执行(线程)与资源分配(进程)相分离的体现
基本概念 数据库(Database): 经过组织的数据集合 数据库管理系统(Database Management System, DBMS): 用于管理数据库的软件 关系数据库(Relational Database): 直观上来说,就是以表格结构管理数据的数据库 结构化查询语言(Struct...
事务 事务(transaction),指作为一个整体执行的数据库操作序列。
什么是文件 文件(file) 是一个有名字的源(source),可以从中读取数据 又或者是一个有名字的目标(target),可以向其中写入数据
Notation 命令行语法表示法
Notation 命令行语法表示法
背景 为了确保软件能够使用正确的文件进行工作,开发团队在软件中实现了一个文件校验功能。其处理流程如下图所示。