Google Interview Question for Software Engineer / Developers
- -3of 5 votes
The setup is that we are given a series of text files which contain information regarding a code repository's commits. Each file represents a single commit and they are formatted as follows:- Guy January 29, 2014 in United States
Commit #: XXX
Reviewer(s): XXX, XXX, ...
Date: XX:XX:XX XX/XX/XXXX
The commit number is unique and is generated in synchronous order. There is exactly 1 unique author. There are a variable number of reviewers, delimited by commas; if there are no reviewers, that line is absent from the file. There are a variable number of edited files in the commit, each receiving its own line. The time/date is when the commit was submitted.
First design a graphical model for all of the commit data. Then describe how this model is updated when a new commit is generated. Finally, write the code segment called when a new commit is generated which edits a system that has implemented your model of the data - its input is a file name and whatever necessary data structures that are maintained by your system.
| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer System Design
Interview Type: In-Person
Open Chat in New Window