Engineering Interview Questions | Glassdoor

Engineering Interview Questions

75,914

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

1 Answer

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;

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.

33 Answers

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

10 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

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?

6 Answers

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

7 Answers

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

6 Answers

Write a method to decide if the given binary tree is a binary search tree or not.

4 Answers

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

4 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?

7 Answers
110 of 75,914 Interview Questions