YogeshZT's blog

By YogeshZT, history, 2 years ago, In English

I was doing the question 1498B - Box Fitting. Here are my two submissions 271307925 and 271307851. One of the approaches works correctly while other gives TLE. The only difference between them is how I initialize the iterator 'it' using the upper_bound function.

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By YogeshZT, history, 2 years ago, In English

I read somewhere that unordered maps are faster than normal maps. However when I was solving a question, the moment I replaced the map with an unordered map, it gave TLE. Here is the submission 262627698

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it

By YogeshZT, history, 3 years ago, In English

Hello, I was solving the question which involves finding Kth ancestor of a node in a tree using binary lifting. I was wondering if instead of binary lifting, is there something like n-ary lifting (n>2 ofc). Is it something which can be thought of and will it be more efficient?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it