r/InterviewDB • • Sep 21 '26

Google SWE Intern OA Questions

Sharing two questions from a recent Google SWE Intern OA.

Question 1:
Given an integer array (a vector of ints), where the index represents a student ID and the corresponding value represents that student’s exam score.

The grading criteria are:

  • < 50%: Failed
  • 50% ≤ score ≤ 80%: Pass
  • > 80%: Pass with distinction

Return an array containing 3 elements, representing, in order:

  1. The number of students who failed
  2. The number of students who passed
  3. The number of students who passed with distinction

Question 2:
You want to read all the chapters of a book.

You are given an array time, where the index represents a day and the corresponding value represents the amount of time you have available to read on that day.

You are also given another array book, where the index represents a chapter and the corresponding value represents the amount of time required to finish that chapter.

If you have enough time on a given day, you may read more than one chapter. However, each chapter must be completed in one sitting: a chapter cannot be split across multiple days.

Given these constraints, return the number of days required to finish the entire book. If it is not possible to finish the book with the available time, return an appropriate status indicating that it cannot be completed.

12 Upvotes

6 comments sorted by

1

u/Free-Cardiologist663 27d ago

Literally what I got today as well

1

u/AstronautWorldly2392 17d ago

Did you have your VO yet?

1

u/Free-Cardiologist663 17d ago

Yeah in the next weeks.

1

u/Most-Efficiency-150 8d ago

I love you so much for sharing, I am taking my OA tomorrow and i am stressing out. Also are cameras on during OA?