## Samsung Interview Question for Research Scientists

Country: United States

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

How many dimensions?

Comment hidden because of low score. Click to expand.
0

2D

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

This question sounds very vague to me.

What do you mean by convex hull? As far as I know, "convex hull" is more of an operator rather than an object, i.e., convex hull of a set is the smallest convex set covering the set.

Intersection of two convex sets is also convex. So if you know an algorithm which gives you the points inside a convex set, just apply it to the intersection.

From a computational point of view, lets approximate the convex set using a convex polyhedron, i.e, assume the set is defined as

S = {x | A x <= b} for some A and b.

Now for two different sets you get two different A and b. Say A1 and A2 and b1 and b2.
Then

S1 \cap S2 = {x | A1 x \le b1 and A2x <= b2} = {x | [A1; A2] [x; x] <= [b1; b2]}
= {x | [A1; A2] [I, 0; I; 0] x \le [b1 b2]}

which is another polyhedron with A = [A1; A2] \times [I, 0; I, 0] and b = [b1; b2].

BTW, unless your polyhedron is trivial, there are infinite points in it.

Comment hidden because of low score. Click to expand.
0

But you can represent it by a finite number of hyperplanes, can't you?

Comment hidden because of low score. Click to expand.
0

But that would be a polyhedron. Intersection of hyperplane inequalities, like <a,x> <= b.

Comment hidden because of low score. Click to expand.
0

convex hull is a polyhedron, you yourself said it. But maybe there is more...

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

I work at microsoft so I know the answer always.

Use vertical ray shooting problem with path compression and fractional cascading. Easy.

Comment hidden because of low score. Click to expand.
0

Did you get fired from Samsung?

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

Basic feasibility convex problem. CVX can solve this.

find x
st
Ax<=b
Cx<=d

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.

### 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.