arjitkansal's blog

By arjitkansal, history, 2 months ago, In English,

Hello everyone!

I'm looking for an 2-months internship during this summer in 2019. Like many others, even I dream of getting into Google or Facebook but anything where my competitive coding skills can prove to be useful.

Currently, I'm studying 'Instrumentation & Control Engineering' but seriously not interested in its core. I heard from some people that Google and Facebook has some internship roles related to competitive coding as well, but I couldn't find any such on their websites. If anyone has any idea of them, please tell me about them.

And if anyone can refer me, kindly let me know. I'll send my resume.

That would be more than just a help :)

Read more »

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

By arjitkansal, history, 3 months ago, In English,

It has been months, I've not able to think of any solution to solve this problem "Component Tree".

link to the problem

As this is Gym Problem, I'm not able to look for the solutions. It would be a great help if someone can provide me with the hints to solve the problem.

Thanks :)

Read more »

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

By arjitkansal, history, 6 months ago, In English,

It has been almost 5 hours and more than 5 pages of submissions in the queue. It's really annoying.

Does anybody know, When it is expected to recover ?

Read more »

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

By arjitkansal, history, 6 months ago, In English,

This doubt is related to the problem :-

Xenia and Tree

Centroid Decomposition Approach.

This is the link to my solution.

What I did to calculate distances of each node to its parent in centroid tree was while making the Centroid tree, I was storing the distances of current node in the DFS with the previous centroid in the Centroid Tree in a map.

And after the DFS, if distances of some nodes to it's indirect parents are left, I updated them by the formula

dis[current_node][parent of indirect parent]=dis[current_node][indirect parent]+dis[indirect parent][parent of indirect parent];

But I'm getting a WA at test case 12.

Can someone please help me debug this approach ?

I'm sure there is no implementation problem with centroid tree transformation as I used the same code in another problem, there it worked. Only issue can be there in calculation of the distances.

Read more »

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