prakhar897's blog

By prakhar897, history, 5 years ago, In English

I was trying to solve this problem. Here my solution which got TLE. So i copied the exact author's solution in Java but it's still getting TLE. solution

Can anyone tell me whats happening here?

Full text and comments »

  • Vote: I like it
  • -11
  • Vote: I do not like it

By prakhar897, history, 5 years ago, In English

There are n cities in a circle and distance between every adjacent pair of cities was given. We were asked to determine a pair of cities such that the minimum distance to travel between them is maximum.

For example,the input may be: 8 12 16 10 3 13.

We can definitely solve this in O(n2) complexity.Can we improve the complexity any further?how?

Full text and comments »

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

By prakhar897, history, 6 years ago, In English

I can't find any website that helps in visualization of competitive programming questions such as DP,trees and thinking of making one myself. Any Suggestions to what tools u need. Here's a link to similar webpage.

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By prakhar897, history, 6 years ago, In English

So I'm using java and i got this error.anyone know what this means. For code refer to this

Full text and comments »

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