Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

Блог пользователя imaonemanarmy

Автор imaonemanarmy, история, 6 лет назад, По-русски

I understand how it works. But the question is why it works. This data structure is based on string metrics, it can use the Levenstein distance metric, for example. Here's the article talking about this: http://blog.notdot.net/2007/4/Damn-Cool-Algorithms-Part-1-BK-Trees

My question is this. The author of the article says: "Call the resultant distance d. Because we know the triangle inequality holds, all our results must have at most distance d + n and at least distance d - n from test."

I don't understand why the search segment is [d - n, d + n].

I'd really appreciate if someone explained.

I know that from the triangle inequality we have:

a + b ≥ c
a + c ≥ b → c ≥ b - a
b + c ≥ a → c ≥ a - b

Combining the last 2, we get

c ≥ |a - b|

And then get this:

|a - b| ≤ c ≤ a + b

But I don't understand what to associate a, b, c with. And why does the author say that we need to search in the segment [d - N, d + N] instead of [|d - N|, d + N].

Полный текст и комментарии »

  • Проголосовать: нравится
  • -11
  • Проголосовать: не нравится

Автор imaonemanarmy, история, 6 лет назад, По-английски
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор imaonemanarmy, история, 6 лет назад, По-русски

I understand that there is quite a number of people here who works/has worked for Google or Facebook. So, my question is. How do you get into those companies when no one (or a very little number of other companies) use their technologies?

Let's consider Facebook for example. I want to be a backend software engineer at Facebook. But how do I get that job and relevant work experience? Like no one uses HHVM or hack language and there's no way to get experience in it, I work for a company doing backend stuff with java spring, but none of these cool companies use it. I understand that I can learn android development and it'll be easier to get a job that way, but I am not really passionate about it. Looks like Microsoft is the only company who's tech is widely used everywhere...

I guess Facebook and Google mostly hire interns for these positions then, because they will have to teach them from scratch anyways, rather than experienced developers who are expected to know everything in the interview? Or do these companies look at general and not library specific knowledge and can invest in you and teach you their specific stuff?

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится