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

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

I saw that some people use trie structure using linked list by pointer while other people built that linked list using array. My question is which approach is more efficient.

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

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

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

You are given an array of n integers. Using segment tree how can you find for each number how many numbers are smaller than this are exist before that number. For example:

input: (first number is the value of n) 5 1 4 2 5 3

output: 0 1 1 3 2

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

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

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

After trying a problem if I can't find any idea in decent time, I see the editorial or someone else's solution, get the idea and immediately code it and get accepted. Is it okay? Or should I try to solve/code that problem after some days of seeing editorial or someone else's solution? Which is the best strategy to practice programming?

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

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