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

Автор Tomzik, история, 7 лет назад, По-английски

Hello everyone,

When writing algorithms operating on sequences, we need to be precise with how we deal with bounds.

For instance, in C, we usually write loops such as:

  for (i = 0; i < n; i++) { ... }   // exclusive bound

But in other language, we'd write.

   for i = 0 to n - 1   // inclusive bound

Similarly, let say we write a binary search function binary_search(arr, i, j), we need to to decide whether j is included or not.

How do you decide which version to use? Do you try to be consistent or do you decide depending on the problem?

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

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

Автор Tomzik, история, 7 лет назад, По-английски

Has anyone here done interviews with Facebook? I know they ask applicants to solve algorithmic problems, how do their problems compare with the ones of codeforces? what type of difficulty to expect? Do you think codeforce is a good training resource or should I look somewhere else?

Thanks!

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

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

Автор Tomzik, история, 7 лет назад, По-английски

Finally, I'm blue! I'm looking for advice to keep improving.

I can solve consistently problems A and B, and most of the time C. However, I usually have little time left to address problem D.

I've been working on more difficult problems and algorithms, but I never get to try them in contests as I'm not able to solve A, B, C fast enough. What do you think is a good strategy to improve? should I try to be more fast on the first problems, or should I force myself to work on problem D in the contests?

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

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