由买买提看人间百态

topics

全部话题 - 话题: wordlist
1 (共1页)
Q*****a
发帖数: 33
1
来自主题: JobHunting版 - airBnb电面面经
实现了4种方法
1: 直接遍历完整计算edit distance. 285 clocks.
2: 直接遍历,计算edit distance到 >k 就返回. 149 clocks.
3: Trie+shortcut edit distance. Build trie: 606 clocks, process: 6 clocks.
http://stevehanov.ca/blog/index.php?id=114
4: Generate delete k transformation. Build dict: 17033 clocks. process: 0
clocks.
但这里不仅需要生成delete k的pattern, 还需要生成所有delete 1..k-1的pattern,
否则不能handle如(chrome brome)的case
http://blog.faroo.com/2012/06/07/improved-edit-distance-based-s
#include "common.h"
class Trie {
public:
class TrieNo... 阅读全帖
Q*****a
发帖数: 33
2
来自主题: JobHunting版 - airBnb电面面经
实现了4种方法
1: 直接遍历完整计算edit distance. 285 clocks.
2: 直接遍历,计算edit distance到 >k 就返回. 149 clocks.
3: Trie+shortcut edit distance. Build trie: 606 clocks, process: 6 clocks.
http://stevehanov.ca/blog/index.php?id=114
4: Generate delete k transformation. Build dict: 17033 clocks. process: 0
clocks.
但这里不仅需要生成delete k的pattern, 还需要生成所有delete 1..k-1的pattern,
否则不能handle如(chrome brome)的case
http://blog.faroo.com/2012/06/07/improved-edit-distance-based-s
#include "common.h"
class Trie {
public:
class TrieNo... 阅读全帖
T*****u
发帖数: 7103
3
来自主题: JobHunting版 - linkedin电面题
python初学者贴个python的
def dist(word1, word2):
wordlist = ['this','this','is']
l1,l2 = -1,-1
dist = len(wordlist)
for p in range(len(wordlist)):
if word1==wordlist[p]:
l1 = p
if word1==word2:
l1,l2 = l2,l1
elif word2 == wordlist[p]:
l2 = p
if l1*l2>-1:
if dist>abs(l2-l1):
dist = abs(l2-l1)
if dist==len(wordlist): return None
else: return dist
T*****u
发帖数: 7103
4
来自主题: JobHunting版 - linkedin电面题
python初学者贴个python的
def dist(word1, word2):
wordlist = ['this','this','is']
l1,l2 = -1,-1
dist = len(wordlist)
for p in range(len(wordlist)):
if word1==wordlist[p]:
l1 = p
if word1==word2:
l1,l2 = l2,l1
elif word2 == wordlist[p]:
l2 = p
if l1*l2>-1:
if dist>abs(l2-l1):
dist = abs(l2-l1)
if dist==len(wordlist): return None
else: return dist
b***i
发帖数: 3043
5
来自主题: Programming版 - 这段代码花很长时间,为什么?
在VS2015花40多秒,如果wordList有2455个4个字母构成的字符串。但是在leetcode上
只要半秒。为啥呢?
size_t distance(string a, string b) {
size_t c = 0;
for (size_t i = 0;i if (a[i] != b[i])
if (c++==1)
return c;
return c;
}
size_t size = wordList.size();
size_t from = SIZE_MAX;
size_t dest = SIZE_MAX;
vector> closest; // stores the list of list of shortest
nodes
closest.reserve(size);
for (size_t i = 0;i vector tmpv;
tmpv.r... 阅读全帖
f****e
发帖数: 923
6
public class Solution {
public int ladderLength(String beginWord, String endWord, Set
wordList) {
Queue q = new LinkedList<>();
q.add(beginWord);
wordList.remove(beginWord);
int level = 1;
while(!q.isEmpty()){
int size = q.size();
for(int i = 0; i < size; i++){
String s = q.remove();
for(int j = 0; j < s.length(); j++){
for(char c = 'a'; c <= 'z'; c++){
... 阅读全帖
l**********n
发帖数: 8443
7
you overwrite the value of wordlist here:
wordlist=document.getElementById("wordlist").value;
by reassigning it.
dude
i**********e
发帖数: 1145
8
来自主题: JobHunting版 - 问一道google题
lolhaha 的算法的复杂度是 O(N^2).
应该没有比 O(N^2) 更好的算法了,
但是有一个优化可以把算法运行速度大大提升。
根据 lolhaha 的算法,
1.create hash for each word
2.sort the dictionary by word length.
assume the dictionary become
a[0],a[1]......
find the largest k so that hash(a[0])&hash(a[k])==0,
get max=len(a[0])*len(a[k])
find max i in [2,k-1] so that hash(a[1])&hash(a[i])==0,
compare max and len(a[1])*len(a[i])
next step find max j in [3,i-1]....
Using this online word list:
http://www.sil.org/linguistics/wordlists/english/wordlist/words
(co... 阅读全帖
f*******7
发帖数: 943
9
来自主题: JobHunting版 - 亚麻电面筋, 攒人品,求好运
2个月来,连续reschedule了3次, 终于面上了。
一个wordlist, 给一个word, 查找之(没有重复,sorted)
问了hashtable 出现存储冲突怎么办
如果那个wordlist太大,不能一次载入内存怎么办
我说了线性方法,和二分查找
(但面完跟同学讨论,他说还有个方法是prefix-tree,那个应该是最好的方法)
还问了单链表和双链表区别
编程题是反转单链表
用collabedit写的,那东西反应真慢,有一段时间竟然有一分钟没有更新。。。
但是也比让我拿着电话读code强,否则我连各种括号都说不明白
年底了,希望所有人都好运
f****e
发帖数: 923
10
网上的搜索的众说纷纭
https://goo.gl/ebfvvD
public class Solution {
public int ladderLength(String beginWord, String endWord, List
wordList) {
Queue q = new LinkedList<>();
HashSet list = new HashSet<>(wordList);
int level = 0;
q.add(beginWord);
HashSet set = new HashSet<>();
set.add(beginWord);
while(!q.isEmpty()){
int size = q.size();
level++;
for(int i = 0; i < size; i++){
... 阅读全帖
S*******e
发帖数: 525
11
【 以下文字转载自 English_Communication 俱乐部 】
发信人: SwiftDove (Swift Dove), 信区: English_Communication
标 题: Word List Web Tool for Anyone + Dictionary Lookup in page.
发信站: BBS 未名空间站 (Wed Jul 18 00:38:41 2012, 美东)
If you use Google Chrome Browser, I extended a dictionary lookup tool which
can let you lookup with one click the word without leaving the page. At the
same time, you can add the word to your word lists at http://www.elookinto.com/wordlist. The extension is at: https://chrome.google.com/webstore... 阅读全帖
w********2
发帖数: 632
12
IPMI 2.0 RAKP Authentication Remote Password Hash Retrieval
More recently, Dan Farmer identified an even bigger issue with the IPMI 2.0
specification. In short, the authentication process for IPMI 2.0 mandates
that the server send a salted SHA1 or MD5 hash of the requested user's
password to the client, prior to the client authenticating. You heard that
right - the BMC will tell you the password hash for any valid user account
you request. This password hash can broken using an offline brutefor... 阅读全帖
c********t
发帖数: 5706
13
试试把 toCharArray 往上挪到 String s...下面。
时间tree 遍历,O(wordList.size() * beginWord.length())
空间tree breadth
S*******e
发帖数: 525
14
刚刚建立一个word list web app. 快到暑假了,有小学生生的家长可以看看, 或许有
帮助。 http://www.elookinto.com/wordlist.
l*******s
发帖数: 1258
15
刚试了下 速度不算快
ps:这个wordlist蛮有意思 你是搞语言学相关的吗?

.
l*******s
发帖数: 1258
16
刚试了下 速度不算快
ps:这个wordlist蛮有意思 你是搞语言学相关的吗?

.
S*******e
发帖数: 525
17
昨天,我做了一些Google Dictionaryhttps://chrome.google.com/webstore/detail/
mgijmajocgfcbeboacabfgobmjgjcoja)的延伸工作。 我看到一行:
console.log("FUCK YOU MOTHERFUCKER");
在page_page_action_js_min.js 出现。For windows, the code is located at
C:\Users\userid\AppData\Local\Google\Chrome\User Data\Default\Extensions\
mgijmajocgfcbeboacabfgobmjgjcoja if you have the extension installed.
By the way, I did extended the function at: https://chrome.google.com/
webstore/detail/mkjnchpohljkinmppeljneimbbjblcbd for http://www... 阅读全帖
S*******e
发帖数: 525
S*******e
发帖数: 525
19
来自主题: Seattle版 - Internet explorer app store?
以前这里的网友推荐Google 的 chrome store, 请问MS有类似的东西吗?
最近花了点时间,对IE/FireFox 做了个Google 词典 app (http://crossrider.com/download/ff/16242): 装上它,如果你选了(highlight)一个英文单词,词义就会在弹出小窗口显示,并可以记录该生词)。 这个是以前wordlist+dict (http://elookinto.com) 工作的继续。
S*******e
发帖数: 525
20
以前曾告诉大家youaudio,现在终于有点用处。欢迎秀秀你的英文口语。
【 以下文字转载自 WaterWorld 讨论区 】
发信人: zhengchg (zhengchenggong), 信区: WaterWorld
标 题: 谁来秀一把美国PHD水平的英文?
发信站: BBS 未名空间站 (Sun Nov 11 01:41:38 2012, 美东)
http://www.elookinto.com/wordlist/youaudio/
念这段
"I'm truly honoured to receive (the) John Maddox Prize. Science in China
faces great challenges from superstition, psuedoscience, anti-science and
scientific misconduct. There are more and more Chinese people (who) realise
this is a big problem and are standing up for sci... 阅读全帖
b*******e
发帖数: 36
21
来自主题: Gamble版 - Texas Hold'em Terms:A-B
From http://www.pokerstars.com/poker/terms/wordlist/
"D" for Diamond, "H" for Heart, "S" for spade, "C" for club
Action - (1) Opportunity to act. If a player appears not to realize it's his
turn, the dealer will say "Your action, sir." (2) Bets and raises. "If a
third heart hits the board and there's a lot of action, you have to assume
that somebody has made the flush."
Ante - A small portion of a bet contributed by each player to seed the pot
at the beginning of a poker hand. Most hold'em games
b*******e
发帖数: 36
22
来自主题: Gamble版 - Texas Hold'em Terms:C-D
From http://www.pokerstars.com/poker/terms/wordlist/
"D" for Diamond, "H" for Heart, "S" for spade, "C" for club
Call - To put into the pot an amount of money equal to the most recent bet
or raise. The term "see" (as in "I'll see that bet") is considered
colloquial.
Calling Station - A weak-passive player who calls a lot, but doesn't raise
or fold much. This is the kind of player you like to have in your game.
Cap - To put in the last raise permitted on a betting round. This is
typically the thi
b*******e
发帖数: 36
23
来自主题: Gamble版 - Texas Hold'em Terms:E-I
From http://www.pokerstars.com/poker/terms/wordlist/
"D" for Diamond, "H" for Heart, "S" for spade, "C" for club
Equity - Your "rightful" share of a pot. If the pot contains $80, and you
have a 50% chance of winning it, you have $40 equity in the pot. This term
is somewhat fanciful since you will either win $80 or $0, but it gives you
an idea of how much you can "expect" to win.
Expectation - (1) The amount you expect to gain on average if you make a
certain play. For instance, suppose you put $
b*******e
发帖数: 36
24
来自主题: Gamble版 - Texas Hold'em Terms:J-Q
From http://www.pokerstars.com/poker/terms/wordlist/
"D" for Diamond, "H" for Heart, "S" for spade, "C" for club
Jackpot - A special bonus paid to the loser of a hand if he gets a very good
hand beaten. In hold'em, the "loser" must typically get aces full or better
beaten. In some of the large southern California card clubs, jackpots have
gotten over $50,000. Of course, the jackpot is funded with money removed
from the game as part of the rake.
Kicker - An unpaired card used to determine the bet
b*******e
发帖数: 36
25
来自主题: Gamble版 - Texas Hold'em Terms:P-R
From http://www.pokerstars.com/poker/terms/wordlist/
"D" for Diamond, "H" for Heart, "S" for spade, "C" for club
Pay Off - To call a bet when the bettor is representing a hand that you can'
t beat, but the pot is sufficiently large to justify a call anyway. Example:
"He played it exactly like he made the flush, but I had top set so I paid
him off."
Play the Board - To show down a hand in hold'em when your cards don't make a
hand any better than is shown on the board. For instance, if you have 22
b*******e
发帖数: 36
26
来自主题: Gamble版 - Texas Hold'em Terms:S
From http://www.pokerstars.com/poker/terms/wordlist/
"D" for Diamond, "H" for Heart, "S" for spade, "C" for club
Scare Card - A card that may well turn the best hand into trash. If you have
TC -8C and the flop comes QD-JD-9S , you almost assuredly have the best
hand. However, a turn card of TD would be very scary because it would
almost guar-antee that you are now beaten.
Second Pair - A pair with the second highest card on the flop. If you have
AS -TS, and the flop comes KD-TH-6C , you have fl
b*******e
发帖数: 36
27
来自主题: Gamble版 - Texas Hold'em Terms:T-W
From http://www.pokerstars.com/poker/terms/wordlist/
"D" for Diamond, "H" for Heart, "S" for spade, "C" for club
Table Stakes - A rule in a poker game meaning that a player may not go into
his pocket for money during a hand. He may only invest the amount of money
in front of him into the current pot. If he runs out of chips during the
hand, a side pot is created in which he has no interest. All casino poker is
played table stakes. The definition sometimes also includes the rule that a
player may
K*******y
发帖数: 6003
28
【 以下文字转载自 WaterWorld 讨论区 】
发信人: zhengchg (zhengchenggong), 信区: WaterWorld
标 题: 谁来秀一把美国PHD水平的英文?
发信站: BBS 未名空间站 (Sun Nov 11 01:41:38 2012, 美东)
http://www.elookinto.com/wordlist/youaudio/
念这段
"I'm truly honoured to receive (the) John Maddox Prize. Science in China
faces great challenges from superstition, psuedoscience, anti-science and
scientific misconduct. There are more and more Chinese people (who) realise
this is a big problem and are standing up for science. I consider this award
as an ack... 阅读全帖
d********n
发帖数: 3477
29
【 以下文字转载自 WaterWorld 讨论区 】
发信人: zhengchg (zhengchenggong), 信区: WaterWorld
标 题: 谁来秀一把美国PHD水平的英文?
发信站: BBS 未名空间站 (Sun Nov 11 01:41:38 2012, 美东)
http://www.elookinto.com/wordlist/youaudio/
念这段
"I'm truly honoured to receive (the) John Maddox Prize. Science in China
faces great challenges from superstition, psuedoscience, anti-science and
scientific misconduct. There are more and more Chinese people (who) realise
this is a big problem and are standing up for science. I consider this award
as an ack... 阅读全帖
S*******e
发帖数: 525
30
来自主题: WaterWorld版 - 哭死,我的英语比方舟子还差阿
其实 大家可以到 http://www.elookinto.com/wordlist/youaudio/ 去录一小段,让大家听听,是否自己的英语是否像自己感觉的那么好或那么糟。
咱遇到的真正的洋人倒说咱的英语并不太赖。 倒是同胞还有现在倒霉的印度经理(他
妈的,有时咱听不懂他说的,他有时也听不懂咱说的)经常,有时还非常严重地, 打
击咱的自信心。
S*******e
发帖数: 525
z******g
发帖数: 1331
32
来自主题: WaterWorld版 - 谁来秀一把美国PHD水平的英文?
http://www.elookinto.com/wordlist/youaudio/
念这段
"I'm truly honoured to receive (the) John Maddox Prize. Science in China
faces great challenges from superstition, psuedoscience, anti-science and
scientific misconduct. There are more and more Chinese people (who) realise
this is a big problem and are standing up for science. I consider this award
as an acknowledgement of our efforts from (the) international science
community and I deeply appreciate it. Thank you."
M*****e
发帖数: 4550
s*******u
发帖数: 19
34
来自主题: WaterWorld版 - 谁来秀一把美国PHD水平的英文?
大家热情过去了 -- 你去http://www.elookinto.com/wordlist/youaudio/看看吧。
t*******g
发帖数: 1518
35
来自主题: WaterWorld版 - 请大家也秀秀北美wsn的普通话吧
看看如何。
http://www.elookinto.com/wordlist/youaudio/
再别康桥
轻轻的我走了,
正如我轻轻的来;
再别康桥:志摩的诗
我轻轻的招手,
作别西天的云彩。
那河畔的金柳,
是夕阳中的新娘;
波光里的艳影,
在我的心头荡漾。
软泥上的青荇,
油油的在水底招摇;
在康河的柔波里,
我甘心做一条水草。
那榆阴下的一潭,
不是清泉,是天上虹;
揉碎在浮藻间,
沉淀着彩虹似的梦。
寻梦?撑一支长篙,
向青草更青处漫溯;
满载一船星辉,
在星辉斑斓里放歌。
但我不能放歌,
悄悄是别离的笙箫;
夏虫也为我沉默,
沉默是今晚的康桥!
悄悄的我走了,
正如我悄悄的来;
我挥一挥衣袖,
不带走一片云彩。[
S*******e
发帖数: 525
I***i
发帖数: 14557
37
【 以下文字转载自 WaterWorld 讨论区 】
发信人: zhengchg (zhengchenggong), 信区: WaterWorld
标 题: 谁来秀一把美国PHD水平的英文?
发信站: BBS 未名空间站 (Sun Nov 11 01:41:38 2012, 美东)
http://www.elookinto.com/wordlist/youaudio/
念这段
"I'm truly honoured to receive (the) John Maddox Prize. Science in China
faces great challenges from superstition, psuedoscience, anti-science and
scientific misconduct. There are more and more Chinese people (who) realise
this is a big problem and are standing up for science. I consider this award
as an ack... 阅读全帖
s*******u
发帖数: 19
38
来自主题: Jiangsu版 - 大家去秀家乡话
请鉴别w3是江苏哪个县的?
http://www.elookinto.com/wordlist/youaudio/
再别康桥:志摩的诗
我轻轻的招手,
作别西天的云彩。
那河畔的金柳,
是夕阳中的新娘;
波光里的艳影,
在我的心头荡漾。
软泥上的青荇,
油油的在水底招摇;
在康河的柔波里,
我甘心做一条水草。
那榆阴下的一潭,
不是清泉,是天上虹;
揉碎在浮藻间,
沉淀着彩虹似的梦。
寻梦?撑一支长篙,
向青草更青处漫溯;
满载一船星辉,
在星辉斑斓里放歌。
但我不能放歌,
悄悄是别离的笙箫;
夏虫也为我沉默,
沉默是今晚的康桥!
悄悄的我走了,
正如我悄悄的来;
我挥一挥衣袖,
不带走一片云彩。
z********e
发帖数: 8818
39
来自主题: Zhejiang版 - 求教:为啥总是null? (转载)
【 以下文字转载自 Programming 讨论区 】
发信人: zhuifengke (追风客), 信区: Programming
标 题: 求教:为啥总是null?
发信站: BBS 未名空间站 (Sat Mar 29 17:48:44 2014, 美东)
JavaScript菜鸟尝试写JS,程序请看:
http://js.do/hoccpan/35648
HTML这块:

JS这块:
function uploadlist() {
var selectstar=doc... 阅读全帖
S*******e
发帖数: 525
40
来自主题: BuildingWeb版 - 刚刚建立一个 small word list web app
刚刚建立一个 small word list web app http://www.elookinto.com/wordlist
S*******e
发帖数: 525
41
来自主题: BuildingWeb版 - 自建网站
我也“经营”网站 (http://www.elookinto.com) 好多年了。这个月才从Google Adsense 拿来130块钱 (其中90块还是好几年前挣的,一直不足100块,Google也不给)。
前些时候在文学城写了一小段介绍该网站中小学生学习材料的帖子,那几天到那网站去
的人比较多 -- 最高的一天Google Sense 挣了近40块钱。现在又没多少访问了。曾想
在文学城/mitbbs打广告,可广告费相对挣的太贵了 (恐要赔老多的),也没有做。
上次做一个方舟子的录音模仿(http://www.elookinto.com/wordlist/youaudio/)也吸引了不少眼球。现在我主要用它帮助自己的孩子学习。也有时帮助自己熟悉一些技术(JQUERY,DB, HTML, JAVA, etc.)
z********e
发帖数: 8818
42
来自主题: Programming版 - 求教:为啥总是null?
JavaScript菜鸟尝试写JS,程序请看:
http://js.do/hoccpan/35648
HTML这块:

JS这块:
function uploadlist() {
var selectstar=document.getElementById("selectstar");
if (!selectstar) {
wordlist.value="is null";
return;
}
。。。
为什么老是跳到 if 里面去呢??(也就是说,得不到sel... 阅读全帖
c******3
发帖数: 6509
43
来自主题: Programming版 - 这段代码花很长时间,为什么?
我只是进来赞代码效率的
多级if嵌套,可以有效废掉现代CPU的Piepline,获得较好的stall性能
而且怕速度太快,wordList中任何一对字符串都要反复求distance,把计算强度从O(N)
提升到O(N^2)才是王道
怕stack用不完,所以传值而不是传引用(指针)
b**n
发帖数: 289
44
我看到aspell,但是好像好个wordlist不会搞。谢谢。
或者大家有什么Jian议?
f******r
发帖数: 2975
45
来自主题: _K12版 - 语文语文语文
我坦白
马上五岁
马上K, 肯定不会跳级的:)
我发现我要找的就是另外提一个帖子里
的wordlist【 在 EnjoyMyLife (茄子王) 的大作中提到: 】
1 (共1页)