83. Remove Duplicates from Sorted List: 2. Add Two Numbers: 21. Merge Two Sorted Lists: 206. Reverse Linked List: ...
分类:
编程语言 时间:
2019-07-04 09:44:23
阅读次数:
81
一、pandas常用函数 df.sort_values()——按行列数据排序df.sort_index()——按行列标签排序df.duplicated()——判断重复数据df.drop_duplicates()——去重df.reset_index()——重新设置索引df.set_index()——把 ...
分类:
编程语言 时间:
2019-06-22 19:41:15
阅读次数:
142
import java.util.LinkedList;import java.util.TreeSet; class ListNode { int val; ListNode next; ListNode(int x) { val = x; }}public class Solution { pu ...
分类:
其他好文 时间:
2019-06-15 20:09:43
阅读次数:
107
1dataframe删除某一列的重复元素,默认只留下第一次出现的 https://blog.csdn.net/qq_28811329/article/details/79962511 test_sample_quchong = test_sample.drop_duplicates(['ggid'] ...
分类:
其他好文 时间:
2019-06-07 22:59:42
阅读次数:
190
class Solution { public: vector productExceptSelf(vector& nums) { //用除法必须要考虑元素为0的情况,用双重循环要考虑数组过大超时的情况 //双指针双vector O(n)time O(n) space int n=nums.size... ...
分类:
编程语言 时间:
2019-06-03 23:58:08
阅读次数:
252
Share Share Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not alloca ...
分类:
其他好文 时间:
2019-06-03 10:50:44
阅读次数:
127
Q: 在扫整个链表的时候,到底什么时候用 while(cur!=null) 什么时候用 while(cur.next!=null) 呢? 以[leetcode]83. Remove Duplicates from Sorted List有序链表去重(有重去重)和[leetcode]82. Remov ...
分类:
其他好文 时间:
2019-06-01 09:26:17
阅读次数:
177
题目描述: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in t ...
分类:
其他好文 时间:
2019-05-30 01:26:35
阅读次数:
97
[TOC] 题目描述: 给定一个整数数组 a,其中1 ≤ a[i] ≤ n (n为数组长度), 其中有些元素出现 两次 而其他元素出现 一次 。 找到所有出现 两次 的元素。 你可以不用到任何额外空间并在O(n)时间复杂度内解决这个问题吗? 示例: 解法: cpp class Solution { ...
分类:
编程语言 时间:
2019-05-27 17:51:59
阅读次数:
110
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Given a collection of integers that m ...
分类:
其他好文 时间:
2019-05-26 00:09:52
阅读次数:
123