两个题类似,第一个题是不允许有重复的数字,第二个题是允许每个数字最多重复两个,两个题目都要求在原数组上进行操作,并返回生成数组的长度,即空间复杂度为O(1)。 两个题都是使用双指针,第一个指针指向生成新的数组的最后一个位置,第二个指针指向当前进行判断的位置。 唯一不同的是, 第二个题需要设置一个变量 ...
分类:
其他好文 时间:
2019-04-18 14:58:31
阅读次数:
128
Activate Editor F12 Activate Task Ctrl + F9 Add Artifact to Target Platform Ctrl+Alt+Shift+A Add Block Comment Ctrl+Shift+/ Add Import Ctrl+Shift+M Ad... ...
分类:
系统相关 时间:
2019-04-18 00:44:03
阅读次数:
259
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y ...
分类:
其他好文 时间:
2019-04-16 10:38:18
阅读次数:
175
题目描述:在一个长度为n的数组里的所有数字都在0到n-1的范围内。数组中某些数字是重复的,但不知道有几个数字是重复的。也不知道每个数字重复几次。请找出数组中任意一个重复的数字。例如,如果输入长度为7的数组{2,3,1,0,2,5,3},那么对应的输出是第一个重复的数字2。#-*-coding:utf-8-*-#@Time:2019-04-1517:31#@Author:JayceWong#@Pro
分类:
编程语言 时间:
2019-04-15 20:18:13
阅读次数:
179
Zabbix3.4.x二进制包升级至Zabbix4.01、官方文档RedHatEnterpriseLinux/CentOS:https://www.zabbix.com/documentation/4.0/zh/manual/installation/upgrade/packages/rhel_centosDebian/Ubuntu:https://www.zabbix.com/documenta
分类:
其他好文 时间:
2019-03-26 09:18:20
阅读次数:
213
作者:刘磊 文中参考代码出处:https://github.com/mengning/linuxkernel/ 本文主要针对进程创建、可执行文件的加载和进程间切换三大部分进行实验并分析。 实验环境:Ubuntu 16虚拟机、VMware 14 1 进程创建 进程(Process)是计算机中的程序关于 ...
分类:
系统相关 时间:
2019-03-24 19:57:36
阅读次数:
425
[TOC] 题目描述: 给定一个排序链表,删除所有重复的元素,使得每个元素只出现一次。 示例 1: 示例 2: 解法: / Definition for singly linked list. struct ListNode { int val; ListNode next; ListNode(in ...
分类:
编程语言 时间:
2019-03-19 10:44:11
阅读次数:
183
# 解题思路:字典存储计数状态 20190302 找工作期间class Solution(object): def containsDuplicate(self, nums): """ :type nums: List[int] :rtype: bool """ record = {} for i ...
分类:
其他好文 时间:
2019-03-17 15:36:12
阅读次数:
132
一、TcxScheduler【TcxScheduler常用属性】1.Storage - 邦定一个Storage为Scheduler显示提供数据 2.DateNavigate.ColCount - 显示日历的列数3.DateNavigate.RowCount - 显示日历的行数. ColCount x ...
分类:
其他好文 时间:
2019-03-17 10:38:12
阅读次数:
264