Skip to content

Commit 62b1582

Browse files
committed
update(2021-04-08 16:38)
1 parent 03766d2 commit 62b1582

File tree

64 files changed

+68
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+68
-67
lines changed

_posts/2021-04-08-swift-leetcode.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ pin: true
1010
|:---:|:---:|:---:|:---:|:---:|:---:|
1111
| 26 | [删除有序数组中的重复项](https://leetcode.com/problems/remove-duplicates-from-sorted-array) | 简单 | O(n) | O(1) | [Swift](#0026) |
1212

13-
## 删除有序数组中的重复项
1413
<a name="0026" />
1514

15+
## 删除有序数组中的重复项
16+
1617
```swift
1718
/**
1819
* 主要思路:

_site/404.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/about/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/archives/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/categories/flutter/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/categories/git/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/categories/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/categories/ios/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/categories/leetcode/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/categories/代码人生/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/categories/小程序/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/categories/设计模式/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/feed.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://kokohuang.github.io/</id><title>kokohuang's blog</title><subtitle>kokohuang's blog.</subtitle> <updated>2021-04-08T16:36:52+08:00</updated> <author> <name>kokohuang</name> <uri>https://kokohuang.github.io/</uri> </author><link rel="self" type="application/atom+xml" href="https://kokohuang.github.io/feed.xml"/><link rel="alternate" type="text/html" hreflang="zh-CN" href="https://kokohuang.github.io/"/> <generator uri="https://jekyllrb.com/" version="4.2.0">Jekyll</generator> <rights> © 2021 kokohuang </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>LeetCode 刷题笔记</title><link href="https://kokohuang.github.io/posts/swift-leetcode/" rel="alternate" type="text/html" title="LeetCode 刷题笔记" /><published>2021-04-08T12:00:00+08:00</published> <updated>2021-04-08T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-leetcode/</id> <content src="https://kokohuang.github.io/posts/swift-leetcode/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="LeetCode" /> <summary> 序号 标题 难度 时间复杂度 空间复杂度 题解 26 删除有序数组中的重复项 简单 O(n) O(1) Swift 删除有序数组中的重复项 /** * 主要思路: * 定义一个索引index, 遍历数组过程中与该索引的值进行对比,如果不一致,则修改对应索引的值 * * 时间复杂度: O(n), 空间复杂度: O(1) */ class Solution { func removeDuplicates(_ nums: inout [Int]) -&amp;gt; Int { guard nums.count &amp;gt; 0 else { ... </summary> </entry> <entry><title>Swift设计模式概览</title><link href="https://kokohuang.github.io/posts/swift-design-patterns/" rel="alternate" type="text/html" title="Swift设计模式概览" /><published>2020-05-01T12:00:00+08:00</published> <updated>2020-05-01T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-design-patterns/</id> <content src="https://kokohuang.github.io/posts/swift-design-patterns/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="设计模式" /> <summary> 创建型模式 工厂方法模式:在父类中提供一个创建对象的方法,允许子类决定实例化对象的类型。 抽象工厂模式:让你能创建一系列相关的对象,而无需指定其具体类。 生成器模式:使你能够分步骤创建复杂对象。该模式允许你使用相同的创建代码生成不同类型和形式的对象。 原型模式:使你能够复制已有对象,而又无需使代码依赖它们所属的类。 单例模式:让你能够保证一个类只有一个实例,并提供一个访问该实例的全局节点。 结构型模式 适配器模式:使接口不兼容的对象能够相互合作。 桥接模式:可将一个大类或一系列紧密相关的类拆分为抽象和实现两个独立的层次结构,从而能在开发时分别使用。 组合模式:可以使用它将对象组合成树状结构,并且能像使用独立对象一样使用它... </summary> </entry> <entry><title>Swift设计模式之「模板方法模式」</title><link href="https://kokohuang.github.io/posts/swift-design-patterns-template-method/" rel="alternate" type="text/html" title="Swift设计模式之「模板方法模式」" /><published>2020-04-22T12:00:00+08:00</published> <updated>2020-04-22T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-design-patterns-template-method/</id> <content src="https://kokohuang.github.io/posts/swift-design-patterns-template-method/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="设计模式" /> <summary> 在父类中提供一个创建对象的方法,允许子类决定实例化对象的类型。 </summary> </entry> <entry><title>Swift设计模式之「策略模式」</title><link href="https://kokohuang.github.io/posts/swift-design-patterns-strategy/" rel="alternate" type="text/html" title="Swift设计模式之「策略模式」" /><published>2020-04-21T12:00:00+08:00</published> <updated>2020-04-21T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-design-patterns-strategy/</id> <content src="https://kokohuang.github.io/posts/swift-design-patterns-strategy/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="设计模式" /> <summary> 在父类中提供一个创建对象的方法,允许子类决定实例化对象的类型。 </summary> </entry> <entry><title>Swift设计模式之「状态模式」</title><link href="https://kokohuang.github.io/posts/swift-design-patterns-state/" rel="alternate" type="text/html" title="Swift设计模式之「状态模式」" /><published>2020-04-20T12:00:00+08:00</published> <updated>2020-04-20T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-design-patterns-state/</id> <content src="https://kokohuang.github.io/posts/swift-design-patterns-state/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="设计模式" /> <summary> 在父类中提供一个创建对象的方法,允许子类决定实例化对象的类型。 </summary> </entry> </feed>
1+
<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://kokohuang.github.io/</id><title>kokohuang's blog</title><subtitle>kokohuang's blog.</subtitle> <updated>2021-04-08T16:38:40+08:00</updated> <author> <name>kokohuang</name> <uri>https://kokohuang.github.io/</uri> </author><link rel="self" type="application/atom+xml" href="https://kokohuang.github.io/feed.xml"/><link rel="alternate" type="text/html" hreflang="zh-CN" href="https://kokohuang.github.io/"/> <generator uri="https://jekyllrb.com/" version="4.2.0">Jekyll</generator> <rights> © 2021 kokohuang </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>LeetCode 刷题笔记</title><link href="https://kokohuang.github.io/posts/swift-leetcode/" rel="alternate" type="text/html" title="LeetCode 刷题笔记" /><published>2021-04-08T12:00:00+08:00</published> <updated>2021-04-08T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-leetcode/</id> <content src="https://kokohuang.github.io/posts/swift-leetcode/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="LeetCode" /> <summary> 序号 标题 难度 时间复杂度 空间复杂度 题解 26 删除有序数组中的重复项 简单 O(n) O(1) Swift 删除有序数组中的重复项 /** * 主要思路: * 定义一个索引index, 遍历数组过程中与该索引的值进行对比,如果不一致,则修改对应索引的值 * * 时间复杂度: O(n), 空间复杂度: O(1) */ class Solution { func removeDuplicates(_ nums: inout [Int]) -&amp;gt; Int { guard nums.count &amp;gt; 0 else { ... </summary> </entry> <entry><title>Swift设计模式概览</title><link href="https://kokohuang.github.io/posts/swift-design-patterns/" rel="alternate" type="text/html" title="Swift设计模式概览" /><published>2020-05-01T12:00:00+08:00</published> <updated>2020-05-01T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-design-patterns/</id> <content src="https://kokohuang.github.io/posts/swift-design-patterns/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="设计模式" /> <summary> 创建型模式 工厂方法模式:在父类中提供一个创建对象的方法,允许子类决定实例化对象的类型。 抽象工厂模式:让你能创建一系列相关的对象,而无需指定其具体类。 生成器模式:使你能够分步骤创建复杂对象。该模式允许你使用相同的创建代码生成不同类型和形式的对象。 原型模式:使你能够复制已有对象,而又无需使代码依赖它们所属的类。 单例模式:让你能够保证一个类只有一个实例,并提供一个访问该实例的全局节点。 结构型模式 适配器模式:使接口不兼容的对象能够相互合作。 桥接模式:可将一个大类或一系列紧密相关的类拆分为抽象和实现两个独立的层次结构,从而能在开发时分别使用。 组合模式:可以使用它将对象组合成树状结构,并且能像使用独立对象一样使用它... </summary> </entry> <entry><title>Swift设计模式之「模板方法模式」</title><link href="https://kokohuang.github.io/posts/swift-design-patterns-template-method/" rel="alternate" type="text/html" title="Swift设计模式之「模板方法模式」" /><published>2020-04-22T12:00:00+08:00</published> <updated>2020-04-22T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-design-patterns-template-method/</id> <content src="https://kokohuang.github.io/posts/swift-design-patterns-template-method/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="设计模式" /> <summary> 在父类中提供一个创建对象的方法,允许子类决定实例化对象的类型。 </summary> </entry> <entry><title>Swift设计模式之「策略模式」</title><link href="https://kokohuang.github.io/posts/swift-design-patterns-strategy/" rel="alternate" type="text/html" title="Swift设计模式之「策略模式」" /><published>2020-04-21T12:00:00+08:00</published> <updated>2020-04-21T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-design-patterns-strategy/</id> <content src="https://kokohuang.github.io/posts/swift-design-patterns-strategy/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="设计模式" /> <summary> 在父类中提供一个创建对象的方法,允许子类决定实例化对象的类型。 </summary> </entry> <entry><title>Swift设计模式之「状态模式」</title><link href="https://kokohuang.github.io/posts/swift-design-patterns-state/" rel="alternate" type="text/html" title="Swift设计模式之「状态模式」" /><published>2020-04-20T12:00:00+08:00</published> <updated>2020-04-20T12:00:00+08:00</updated> <id>https://kokohuang.github.io/posts/swift-design-patterns-state/</id> <content src="https://kokohuang.github.io/posts/swift-design-patterns-state/" /> <author> <name>kokohuang</name> </author> <category term="代码人生" /> <category term="设计模式" /> <summary> 在父类中提供一个创建对象的方法,允许子类决定实例化对象的类型。 </summary> </entry> </feed>

_site/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/page2/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/page3/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)