Jarjit_sigh's blog

By Jarjit_sigh, history, 4 years ago, In English

I have faced this problem in my unofficial national team selection test and i have been trying to solve it for days to no avail... Hope someone could help me :(

Given an integer array of length n (n <= 100000). Alberto and Brendaly play a game on it. On each turn the player picks a number from one of the 2 ends of the sequence. Alberto goes first. Both players wants to maximize their total score by the end of the game. If they both play optimally, whats the total score Alberto gets? all elements in array are not larger than 1e9.

Thank you!

Full text and comments »

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

By Jarjit_sigh, history, 5 years ago, In English

Given a set of circles on a Cartesian plane, there are no 2 circles sharing a point. For each circle we want to find the smallest circle that contains it, or report that there is none.

I tried many solutions that works with rectangles, but none can be modified to work with circles. Any suggestions? :(

Full text and comments »

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

By Jarjit_sigh, history, 5 years ago, In English

I stumbled across this tree problem and i can't seem to find the name of the data structure for the problem.

It's like this: You are given a tree and a set of nodes. I want to build another tree that contains all the nodes needed and removes all the uneccessary nodes. I believe it's called virtual trees or something, but i just can't find any materials about it. Could anyone tell me the name of it? Some documentations about it helps too.

Apreciate all helps! Thanks

Full text and comments »

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