Engineering Interview Questions | Glassdoor

Find jobs for Engineering

Engineering Interview Questions


Engineering interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Given a table that has parent's id and children id, write a query that return grandparents and grandchildrens

4 Answers

Relational schema - p_name and c_name make a composite primary key relation {p_name varchar, c_name varchar} select t1.Grandchild, t2.Grandparent from (select c_name as Grandchild, p_name from relation where p_name in (select distinct(r.p_name) from relation r join relation t on r.p_name = t.c_name)) as t1 inner join (select p_name as Grandparent, c_name from relation where c_name in (select distinct(r.p_name) from relation r join relation t on r.p_name = t.c_name)) as t2 on t1.p_name=t2.c_name order by t1.Grandchild;

select t1.Grandchild as Grandchild ,t2.Grandparent as Grandparent from (select distinct(r.c_name) as Grandchild,r.p_name as parent from relation r join relation t on r.p_name = t.c_name) t1 ,(select distinct(r.p_name) as Grandparent,r.c_name as parent from relation r join relation t on r.c_name = t.p_name) t2 where t1.parent=t2.parent;

select a.p_name as grandparent, b.c_name as grandchild from relation a join relation b on a.p_name=b.c_name

You have a 100 coins laying flat on a table, each with a head side and a tail side. 10 of them are heads up, 90 are tails up. You can't feel, see or in any other way find out which side is up. Split the coins into two piles such that there are the same number of heads in each pile.

36 Answers

You are in a boat in a pool with a rock in your hand. You throw the rock into the pool. Does the water level rise, drop, or stay the same?

13 Answers

Write some pseudo code to raise a number to a power.

11 Answers

Describe and code an algorithm that returns the first duplicate character in a string?

12 Answers

In a given sorted array of integers remove all the duplicates.

8 Answers

Suppose you have a matrix of numbers. How can you easily compute the sum of any rectangle (i.e. a range [row_start, row_end, col_start, col_end]) of those numbers? How would you code this?

8 Answers

Given an array of numbers, replace each number with the product of all the numbers in the array except the number itself *without* using division.

8 Answers

What sort would you use if you required tight max time bounds and wanted highly regular performance.

6 Answers

What are the different ways you can you tell if this part is steel or aluminium.

4 Answers
110 of 119,580 Interview Questions