Oracle OCI | SDE 1 (IC-2) | Seattle | Jan 2020 [Offer]
Summary
I interviewed for an SDE 1 position at Oracle OCI in Seattle, WA, and successfully received an offer. The interview process consisted of a phone screen followed by five comprehensive onsite rounds, covering coding, system design, and behavioral aspects.
Full Experience
I had completed one year of full-time work at Amazon as a CSA when a friend from my university, who was graduating, informed me that Oracle was hiring SDEs in Seattle, WA. He kindly provided me with the LinkedIn contact of a manager there. I reached out to the manager with my resume, and they promptly set up a phone interview.
Phone Interview
My phone interview involved a coding challenge. I was asked to process a text file containing various log messages and identify the K most frequently occurring ones. I initially thought of using a max-heap, but then realized that a min-heap, limited to a size of K, would be a more space-efficient approach. I presented both solutions to the interviewer, highlighting the benefits of the min-heap.Onsite Interviews
The onsite part consisted of five rounds, a mix of coding, behavioral, and system design questions.Round 1
This round presented a matrix filled with 0s and Ds, where 0s represent files and Ds represent databases. The goal was to find the shortest distance for each 0 to its nearest D. I first proposed a brute-force solution with O(N^4) complexity, which involved iterating through the matrix and checking neighbors. However, I soon moved to a better solution using Breadth-First Search (BFS), starting from all 0s simultaneously to update distances. I struggled a bit with the BFS implementation but managed to code it out in the final minutes.Round 2
I was asked to implement a Binary Search Tree Iterator. As this is a standard tree question, I didn't face much difficulty. I initially thought of an inorder traversal to store all elements in an array, which could then be iterated. The optimized solution, which I also discussed, involved a controlled recursion method to act as a true iterator, as explained in the official LeetCode solution.Round 3 (Lunch with Manager)
After lunch, there was a short coding exercise: calculating the angle between the hour and minute hands of a clock. I had recently discussed this problem with a friend, which allowed me to quickly provide the solution.Round 4
This round had two parts. The first coding question involved managing a list of unreserved telephone numbers, implementing a `getRandom()` function for retrieving a random number and a `reserve()` function to assign a number, with critical time complexity requirements. Having practiced a similar problem, I was able to solve it efficiently.The second part was a system design problem: designing a centralized logging system to collect logs from 100 servers and enhance user experience by reducing log search time. We had only 15 minutes for this, and my answers were structured around concepts from a popular system design primer.
Round 5
The final technical round asked me to find the longest repeated or duplicated substring within a given string `s`. This was a hard problem, and I could only come up with a brute-force solution. We touched upon advanced concepts like Trie and the Rabin-Karp algorithm, and the interviewer seemed content with our discussion.Behavioral Questions
Oracle Cloud Infrastructure (OCI) has its own set of values, quite similar to AWS Leadership Principles. I was expected to share stories demonstrating how I embodied these values. Additionally, the 'bar raiser' interviewer asked detailed questions about projects I completed during my Masters.By the end of the week, the manager reached out and informed me that I would be receiving an offer.
Interview Questions (7)
01 Matrix - Shortest Distance to Nearest Database
Given a matrix containing 0s (files) and Ds (databases), find the shortest distance for each file (0) to reach the closest database (D).
Binary Search Tree Iterator
Implement a BSTIterator class that represents an iterator over the in-order traversal of a binary search tree. The iterator should support hasNext() and next() operations.
Clock Angle Problem
Calculate the angle between the hour hand and minute hand on an analog clock.
Insert Delete GetRandom O(1) - Telephone Numbers
Implement a data structure that supports getRandom() to get a random unreserved telephone number and reserve(number) to assign a customer a given number. Time complexity for all operations is critical.
Design a Centralized Logging System
Design a centralized logging system capable of collecting logs from 100 servers. The design should prioritize enriching the customer user experience by minimizing log search time.
Longest Duplicate Substring
Given a string s, find the longest repeated or duplicated substring.
OCI Leadership Principles & Project Deep Dive
Behavioral questions focused on Oracle Cloud Infrastructure (OCI) values, which are similar to AWS Leadership Principles. Interviewers expected stories demonstrating these values. The bar raiser also delved into detailed questions about projects from my Masters.
Preparation Tips
I prepared for the interview by studying system design concepts from a primer (likely the donnemartin/system-design-primer). For coding, I leveraged my previous practice on similar problems, which helped with standard questions like the BST iterator and Insert-Delete-GetRandom O(1). I also familiarized myself with OCI's values to prepare for behavioral questions, crafting stories to demonstrate alignment with their principles and readying myself for deep dives into my Master's projects.