How it works?

Img

We write questions

Get data science interview questions frequently asked at top companies.

Img

You solve them

Solve the problem before receiving the solution the next morning.

Img

We send you the solution PREMIUM

Check your work and get better at interviewing!

Get premium

The schedule

We send data science interview questions 3x per week

Monday

Interview question #1

Tuesday

PREMIUM

Get answer to interview question #1

Wednesday

Interview question #2

Thursday

PREMIUM

Get answer to interview question #2

Friday

Interview question #3

Saturday

PREMIUM

Get answer to interview question #3

Sample Questions

Question

Suppose there are 15 different color crayons in a box. Each time one obtains a crayon, it is equally likely to be any of the 15 types. Compute the expected # of different colors that are obtained in a set of 5 crayons. (Hint: use indicator variables and linearity of expectation)

Question
agefavorite_colorgradename
020blue88Willard Morris
119blue92Al Jennings
222yellow95Omar Mullins
321green70Spencer McDaniel

The dataframe is showing information about students. Write code using Python Pandas to select the rows where the students' favorite color is blue or yellow and their grade is at least 90.

Click here to view this problem in an interactive Google Colab notebook.

Question
Suppose you are given the following table, containing information around total tonnage of trash for various landfills across various states. In other words, each row represents the total weight (in tons) of trash at a specific landfill site in a specific state. Table: landfill_weights
landfillIDweightstatenumber_garbage_vehicles
1230095California1005
1240185California850
00992105New York1300
00882100New York1000
1110055Michigan580
1120175Michigan700
1120760Michigan500
Using the above table, write a SQL query to return the landfill with the second highest amount of garbage (based on weight) for each state shown. Note: You can assume each row represents a unique landfill (e.g. the weights shown are the total weights, and do not need further aggregation) and each weight happens to be unique (e.g. there are no ties).

See what others are saying

The majority of premium users (90%++) who canceled their subscription did so because they landed a job!

Used by thousands of students and industry workers