Interview Question


Country: United States




Comment hidden because of low score. Click to expand.
1
of 1 vote

How do you define "draw chords at random"?

Because different methods of selecting random chords yield different probabilities.

This problem is known as Bertrand's Paradox

en.wikipedia.org/wiki/Bertrand_paradox_(probability)

- dev.cpu August 30, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

That's a good point. I considered that myself. I decided that under my definition of "random chords" the answer would be 1/3, but that's just under my random chord selection scheme.

- Anonymous August 31, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Assuming the circle is made up of 360 points.
A chord can be made by choosing any two points.
For any point we can choose upto 120 points on one side of it,
And 120 points on other side of it for the cord to be shorter.

=> 2/3 of the chords will be shorter

- skadi October 27, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

area of circle-area of eq/area of eq......=ans....

- Anonymous January 05, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

If R is radius of the circle

Length of a side of the equilateral triangle will be (sqrt(3))*R
Largest possible chord is the diameter - length 2R
so sqrt(3)/2 should be the answer

- Tushar August 30, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Sorry
Did not give it much thought
there can be many chords

- Tushar August 30, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Draw a equilateral triange. Pick any one vertex and draw a tangent to it. Now if you notice, chords wth one end at this vertex have length more than side of triangle if they are passing through the inside portion of triangle in that case the angle made by the chord with the tangent is between 60 to 120 degrees whereas the chord can make any angle between 0 to 180 uniformly.

(120-60 )/180 = 1/3

- shrinivas vasala September 18, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Is it not a geometry question? lets say we have an equilateral triangle . Lets assume we remove the two sides of the equilateral triangle and left with one side. Now, the chords which will be lesser in length than this chord, will be on both sides of the diameter and lie symetrically. So the region behind the chord is the region we want. And then we can double this region. So the fraction can be found as follows
p*i*r*r (area of circle) == x
3*sqrt(3) / 4 *r*r (area of triangle) == y
x/2y is the answer.

- shaun October 23, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Sine 30= Half

- Mike August 30, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More