Google Interview Questions
- 2of 2 votes
AnswersWrite a function that receives a position in 2 dimensional (x,y) array, which was initially initialized with 'o' (signals "water"), the function changes the value/state of that position to 'x' (signals "land") and returns the number of isles in the board.
- vesh February 08, 2017 in Irland
For example, for 3x3 board, it will initially look like the following:
o o o
o o o
o o o
After calling the function with the position (1,2), the board will look like the following:
o o x
o o o
o o o
and the functions returns 1
An isle is defined as 'x' surrounded horizontally and vertically with 'o'
In the following board there is only one isle
o o o
o x x
o x o| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Algorithm - 4of 4 votes
AnswersYou are given a scrambled input sentence. Each word is scrambled independently, and the results are concatenated. So:
- merlinme October 25, 2016
'hello to the world'
might become:
'elhloothtedrowl'
You have a dictionary with all words in it. Unscramble the sentence.| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer String Manipulation - 4of 4 votes
AnswersWhat happens when you type in shell
list=$(ls)
Interviewer expected the list of system-calls made, file-descriptors involved etc.
- Moony April 29, 2014 in United States| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Unix - 2of 2 votes
AnswersGiven a set top box:
- chandeepsingh85 September 26, 2013 in United States
a, b, c, d, e,
f, g, h, i, j,
k, l, m, n, o
p, q, r, s, t
u, v, w, x, y
z
Write code to give the character sequence given a word, For example, if the word is "CON", the function will print this:
Right//now we're at B
Right//now we're at C
OK//to select C
Down
DOwn
Right
Right
OK//to select O
Left//now at N
OK//to select N
note: Be careful when you're at Z. if you go to the right, you will get stuck.
Afterwards, the interviewer adds a space to the right of 'Z' to test the code.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Site Reliability Engineer String Manipulation Algorithm - 2of 2 votes
AnswersYou are trying to to daemonize an unknown, black-box binary executable. The binary executable returns no output to STDOUT or STDERR. Assume that the mystery binary return code is non-zero. What troubleshooting steps might you take to learn more about what the binary is supposed to do, and why it is failing?
- longbelly March 21, 2013 in United States| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Unix - 2of 2 votes
AnswersDuring boot, after the BIOS performs a successful power-on-self-test, describe everything that occurs until the console is presented to the user.
- longbelly March 21, 2013 in United States| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Computer Architecture & Low Level - 5of 5 votes
AnswersGiven a source string and a destination string write a program to display sequence of strings to travel from source to destination. Rules for traversing:
- Dee November 06, 2012 in United States
1. You can only change one character at a time
2. Any resulting word has to be a valid word from dictionary
Example: Given source word CAT and destination word DOG , one of the valid sequence would be
CAT -> COT -> DOT -> DOG
Another valid sequence can be
CAT -> COT - > COG -> DOG
One character can change at one time and every resulting word has be a valid word from dictionary| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer - 1of 1 vote
AnswersGenerate a number is range (1,n) but not in a list (i,j)
- superffeng September 27, 2012 in United States for Site reliabilty
for example range is (1,1000), list is [2,3,5,9,199,200,344]| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Algorithm - 0of 0 votes
AnswersGiven a number represented as an array of digits, plus one to the number.
- superffeng September 27, 2012 in United States for Site reliabilty
ie. 1000 is [1,0,0,0] result is [1,0,0,1]| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Algorithm - 1of 1 vote
AnswersHow to check num is power of 2?
- superffeng September 27, 2012 in United States for Site reliabilty| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Algorithm - 1of 1 vote
AnswersGiven a BST, maximum and minimum value, find the sum of nodes with values between the above range
- bicepjai September 25, 2012 in United States for Google Engineering| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Algorithm - 0of 0 votes
AnswersWrite an algorithm to find the ‘next’ node (e.g., in-order successor) of a given node in a binary search tree where each node has a link to its parent.
- bicepjai September 25, 2012 in United States for Google Engineering| Report Duplicate | Flag | PURGE
Google Site Reliability Engineer Algorithm