字符串是一个有序的字符的不可变序列,用于存储基于文本的信息。字符串所包含的字符存在从左至右的位置顺序,不可以在原处(in-place)修改。Python没有C语言的字符和字符串之分,只有字符串。从严格意义上说,字符串是单个字符的序列,支持元素基于位置的操作,能够通过位置索引字符;由于字符串具有不可变 ...
分类:
编程语言 时间:
2018-12-13 13:21:16
阅读次数:
248
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou ...
分类:
其他好文 时间:
2018-12-11 21:48:39
阅读次数:
217
定义 它的工作原理是通过构建有序序列,对于未排序数据,在已排序序列中从后向前扫描,找到相应位置并插入。插入排序在实现上,通常采用in place排序(即只需用到 O(1) 的额外空间的排序),因而在从后向前扫描过程中,需要反复把已排序元素逐步向后挪位,为最新元素提供插入空间。 一般来说,插入排序都采 ...
分类:
编程语言 时间:
2018-12-10 18:26:02
阅读次数:
202
{ // Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is ...
分类:
Web程序 时间:
2018-12-10 11:26:25
阅读次数:
494
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. Follow up: Did you use extra sp ...
分类:
其他好文 时间:
2018-12-05 10:24:42
阅读次数:
216
Greenland's icy mountains are not an obvious place to search for an archive of economic history, but a study just published in the Proceedings of the ...
分类:
其他好文 时间:
2018-11-24 14:38:17
阅读次数:
142
Wireless Network 题目链接:http://poj.org/problem?id=2236 Description: An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) ...
分类:
Web程序 时间:
2018-11-19 22:39:11
阅读次数:
285
By default in Linux there are a few different mechanisms in place that may rate limit logging. These are primarily the systemd journal and rsyslog rat ...
分类:
系统相关 时间:
2018-11-16 11:39:11
阅读次数:
302
算法简介 插入排序(Insertion Sort)是一种简单直观的排序算法。它的工作原理是通过构建有序序列,对于未排序数据,在已排序序列中从后向前扫描,找到相应位置并插入。插入排序在实现上,通常采用in-place排序(即只需用到O(1)的额外空间的排序),因为在从后向前扫描过程中,需要反复把已排序 ...
分类:
编程语言 时间:
2018-11-10 10:40:53
阅读次数:
116
https://leetcode.com/problems/remove-element/description/ Given an array nums and a value val, remove all instances of that value in-place and return ...
分类:
其他好文 时间:
2018-11-04 12:44:00
阅读次数:
128