摘要: Leetcode.215 Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted 阅读全文
posted @ 2020-08-03 12:32 mhp 阅读(83) 评论(0) 推荐(0)
摘要: Leetcode.80 | Remove Duplicates from Sorted Array II Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most t 阅读全文
posted @ 2020-07-31 15:16 mhp 阅读(61) 评论(0) 推荐(0)
摘要: Leetcode.26 | Remove Duplicates from Sorted Array(Python) Given a sorted array nums, remove the duplicates in-place such that each element appear only 阅读全文
posted @ 2020-07-31 10:59 mhp 阅读(132) 评论(0) 推荐(0)
摘要: Leetcode.27 | Remove Element(Python) Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do no 阅读全文
posted @ 2020-07-29 11:18 mhp 阅读(106) 评论(0) 推荐(0)
摘要: Leetcode.283 Move Zeroes Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero e 阅读全文
posted @ 2020-07-28 12:01 mhp 阅读(92) 评论(0) 推荐(0)
摘要: Leetcode Introduction 本文旨在将leetcode的题型分类 Pattern: Sliding window 滑动窗口类型的题目经常是用来执行数组或是链表上某个区间(窗口)上的操作。比如找最长的全为1的子数组长度。滑动窗口一般从第一个元素开始,一直往右边一个一个元素挪动。 Lee 阅读全文
posted @ 2020-07-28 10:59 mhp 阅读(159) 评论(0) 推荐(0)
摘要: Leetcode.75 Sort Colors Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, w 阅读全文
posted @ 2020-07-27 09:52 mhp 阅读(107) 评论(0) 推荐(0)
摘要: 数据存储 RDBMS: Data is typed structured before stored Entity == table Record == row Query: group by / join 无法存储大数据 无法进行大数据的实时查询 Hadoop/HDFS: 能存 无法进行实时查询 阅读全文
posted @ 2020-04-13 10:47 mhp 阅读(96) 评论(0) 推荐(0)
摘要: Redis 概述 官网: "https://redis.io/" RDBMS:mysql、oracle、db2、sql server 两个方面:read & write NoSQL: HBase Redis ... 数据库 Redis 是一个高性能的 数据库 Redis诞生的业务场景 大负荷、大负载 阅读全文
posted @ 2020-04-06 14:21 mhp 阅读(167) 评论(0) 推荐(0)
摘要: 简单而复杂的排序算法 目前市面上常见的排序算法主要有两种: $O(n^2)$:选择排序,冒泡排序,插入排序、希尔排序(有时能$nlogn$) $O(nlogn)$:快速排序、归并排序、堆排序、 $O(n+k)$:计数排序、桶排序 $O(n k)$:基数排序 算法优化往往与排序思想一点而通,本文主要介 阅读全文
posted @ 2020-03-07 11:07 mhp 阅读(485) 评论(0) 推荐(0)