codeanna's blog

By codeanna, history, 5 years ago, In English

In this question https://www.hackerearth.com/problem/algorithm/rescuer-1/description/ 2 for finding the point on x axis say P,where the straight line (joining the two point) cuts on x axis, form a linear equation and put y=0,this will give P but in editorial they use terniary search for finding P and answer is not same. Is my approach correct?? Pls help? Thanks

Full text and comments »

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