一.term与match 1.区别 2.查找多个精确值 二.修改器 1.词条建议器 两种顺序都可以得到结果 2.词组建议器 三.建议器(前缀提示) 1.基本使用 2.权重 3. size参数(返回数据量,默认是5) 4.skip_duplicates(过滤重复) 四.解决 size 最大10000的 ...
分类:
其他好文 时间:
2019-05-24 22:21:21
阅读次数:
134
leecode练习 292、Nim游戏 题目要求: 你和你的朋友,两个人一起玩 “Nim 游戏”,桌子上有一堆石头,每次你们轮流拿掉 1 3 块石头。 拿掉最后一块石头的人就是获胜者。你作为先手 你们是聪明人,每一步都是最优解。 编写一个函数,来判断你是否可以在给定石头数量的情况下赢得游戏 示例: ...
分类:
其他好文 时间:
2019-05-21 20:51:48
阅读次数:
147
分析: 为节约空间,采用一维辅助空间,但是我分析问题时候稍微有点难受。还好。 ...
分类:
其他好文 时间:
2019-05-18 12:26:23
阅读次数:
102
/***** //sell[i]表示截至第i天,最后一个操作是卖时的最大收益; //buy[i]表示截至第i天,最后一个操作是买时的最大收益; //cool[i]表示截至第i天,最后一个操作是冷冻期时的最大收益; //递推公式: //sell[i] = max(buy[i-1]+prices[i],... ...
分类:
其他好文 时间:
2019-05-15 12:38:01
阅读次数:
107
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, ...
分类:
其他好文 时间:
2019-05-13 20:18:35
阅读次数:
112
Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa ...
分类:
其他好文 时间:
2019-05-12 12:23:03
阅读次数:
139
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 the arr ...
分类:
其他好文 时间:
2019-05-12 10:39:59
阅读次数:
120
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the ...
分类:
编程语言 时间:
2019-05-05 14:41:47
阅读次数:
164
leecode刷题(26) 用栈实现队列 用栈实现队列 使用栈实现队列的下列操作: push(x) 将一个元素放入队列的尾部。 pop() 从队列首部移除元素。 peek() 返回队列首部的元素。 empty() 返回队列是否为空。 示例: 说明: 你只能使用标准的栈操作 也就是只有 , , , 和 ...
分类:
其他好文 时间:
2019-05-05 13:22:22
阅读次数:
149