### Abinash's blog

By Abinash, 7 years ago,

My Idea :If D = Distance between Two Upper L Block then there are two case

1. If I make D larger that make the circle larger
2. If I make D smaller that make the circle larger for upper 'v' block

So this properties make the graph of Distance like 'U' ( Unimodal ) That why I thinks it can be solve by Ternary Search where variable is D here . But don't figure out how to check is circle is larger or smaller when searching ? I checking I have calculate radius of circle for mid values , but how ?

•  » » » 7 years ago, # ^ |   0 Okay, I'll try to do this.Do you know how to solve the following problem: you have a function bool f(double x) that returns false when x < x0 and true when x >= x0, and you need to find x0?