tantan的博客

Notes, ideas, and observations

思路: 对于数字x = an ... ai+1 ai ... a1 a0, 如果任意相邻的ai+1,ai不符合单调递增, 就给原数字减去(ai + 1) * 10 ^ i, 减去之后得到的新数字即为y

  • 不需要预先定义 schema 即可存储数据, 适合于快速原型开发, 以及需求经常变更的情况

  • 存储使用的 BSON 格式非常灵活, 可以表示像数组, 字典这样的数据, 而在 RDB 中需要拆分成多个表

1
2
3
4
5
6
template <class ForwardIterator>
ForwardIterator unique ( ForwardIterator first, ForwardIterator last );

template <class ForwardIterator, class BinaryPredicate>
ForwardIterator unique ( ForwardIterator first, ForwardIterator last,
BinaryPredicate pred );
0%