Saturday, July 28, 2012

Relay Health Interview Questions


This company is in Emeryville, CA.

1) Implement bubble sort 
2) Find the most common occuring letter in a string
3) What is the expected output of
static void RelayHealthQuestion1() 
{
    int[] numbers = { 1, 2, 3, 4, 5, 6 };
    var result = numbers.Count(item => item % 2 == 1);        
}

Answer: 3

4) With class diagram, write classes for the following:
    a) Zoo which has lot of animal
    b) Animal has cage of different size tall, short, etc.
    c) Some animals in zoo can walk (Class: Mammalia) and some can fly (Class: Aves).
    d) All animals can talk

DB questions:
5) Suppose you have the following DB table with its data:

EmployeeID    |  Salary       |     Department
1                        100,000                 2
2                        105,000                 1
3                        125,000                 2

Give the count of departments which have Salary > 100,000 and number of employees are 2 or more

6) Write an update statement
Table Name: Alphabet.

Letter      Order
X             NULL
Y             NULL
A             NULL
C             NULL

Expected output:

Letter      Order
X              7
Y              8
A              1
C              2

7) What are anonymous methods in C#