上篇文章我们讲了mongodb的crud基本操作
http://blog.csdn.net/stronglyh/article/details/46812579
这篇我们来说说mongodb的进阶--------------高级查询
一:各种查询
1:条件操作符
, >= 这个操作符就不用多解释了,最常用也是最简单的。
db.collection.find({ "field" : {...
分类:
数据库 时间:
2015-07-09 18:11:15
阅读次数:
177
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2015-07-09 17:29:41
阅读次数:
106
find查找命令常见参数:-name根据文件名寻找文件
-user根据文件拥有者寻找文件
-group根据文件所属组寻找文件
-perm根据文件权限寻找文件
-size根据文件大小寻找文件[±Sizek]
-type根据文件类型寻找文件,常见类型有:f(普通文件)、c(字符设备文件)、b(块设备文件)、l(符号链..
分类:
其他好文 时间:
2015-07-09 14:52:56
阅读次数:
131
题目:
Given an array S of n integers, are there elements a, b, c in S such that a + b + c =
0? Find all unique triplets in the array which gives the sum of zero.
Note:
Elements in a tripl...
分类:
编程语言 时间:
2015-07-09 14:42:02
阅读次数:
129
Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If...
分类:
其他好文 时间:
2015-07-09 14:41:20
阅读次数:
87
题目:
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume
that each input would h...
分类:
编程语言 时间:
2015-07-09 14:40:16
阅读次数:
111
Kth Smallest Element in a BST
Given a binary search tree, write a function kthSmallest to find the kth
smallest element in it.
Note:
You may assume k is always valid, 1 ≤ k ≤ BST's to...
分类:
其他好文 时间:
2015-07-09 14:40:05
阅读次数:
122
30 Substring with Concatenation of All Words链接:https://leetcode.com/tag/hash-table/
问题描述:
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting ind...
分类:
其他好文 时间:
2015-07-09 14:38:37
阅读次数:
94
136 Single Number链接:https://leetcode.com/problems/single-number/
问题描述:
Given an array of integers, every element appears twice except for one. Find that single one.Note:
Your algorithm should hav...
分类:
其他好文 时间:
2015-07-09 14:34:47
阅读次数:
92
You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatena...
分类:
其他好文 时间:
2015-07-09 14:26:16
阅读次数:
137