摘要:
Problem Suppose a sorted array 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). Find the minimum 阅读全文
摘要:
Problem Suppose a sorted array 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). Find the minimum 阅读全文
摘要:
Search in Rotated Sorted Array Problem Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time c 阅读全文
摘要:
Problem Suppose a sorted array 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). You are given a t 阅读全文
摘要:
排序 基本概念 稳定性:稳定性是指两个相同的值,排序前后的顺序保持不变,即该排序算法是稳定的 衡量标准:时间复杂度、空间复杂度 内部排序 插入排序:直接插入排序、折半插入排序、希尔排序 交换排序:冒泡排序、快速排序 选择排序:简单选择排序、堆排序 归并排序 基数排序 外部排序 多路归并排序 注:基于 阅读全文
摘要:
Problem A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and returni 阅读全文
摘要:
Problem Write an efficient algorithm that searches for a value in an m x n matrix, return the occurrence of it. This matrix has the following properti 阅读全文
摘要:
Problem Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are 阅读全文
摘要:
Problem Given a sorted array of n integers, find the starting and ending position ofa given target value. If the target is not found in the array, ret 阅读全文
摘要:
Mysql与MongoDB查询互转 mongo查询严格要求数据格式! 1、只想查出某些数据,不想全部数据都查出来 mysql: select name from user; mongo: db.user.find( {}, { _id : 0, name : 1 } ) 说明:user是集合的名称, 阅读全文