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

Автор sandeepandey, 10 лет назад, По-английски

Hello All.

I am trying this problem:http://www.spoj.com/problems/EPALIN/. I have implemented Rabin karp algorithm (Roll Hash).I am getting wrong answer for this problem.

Could you guys tell me some test cases where it may fail. MyCode:http://ideone.com/liVEDu

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

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

Автор sandeepandey, 11 лет назад, По-английски

Count smaller elements on right side

input :[4,12,5,6,1,34,3,2] output: [3,5,3,3,0,2,1,0]

I know this can be solved using MergeSort but i want to know how to solve it using segment tree ? What actually we have to store in Node of segment tree.

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

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