Google Interview Report
- 0of 0 votes
AnswersWrite an 0(n) algorithm for detecting conflicts in appointments.
- jp January 06, 2011public class Appointment { long startTime; long endTime; boolean hasConflict; } public static ArrayList<Appointment> markCOnficts(ArrayList<Appointment> apntmnts) //your code here..for each appointment if it //has a conflict you need to set hasConflict //parm = true
| Report Duplicate | Flag | PURGE
Google Developer Program Engineer - 0of 0 votes
AnswersWrite a method to return the index of first out of order letter in input string
- jp January 06, 2011| Report Duplicate | Flag | PURGE
Google Developer Program Engineer Coding - 0of 0 votes
AnswersGiven the current board configuration of "Game of Life" game, write a method/function to next generation board configuration.
Note: search "Conway's Game of Life" wikipedia for rules
Input: 2D array int[][]board,
board[i][j] = 1 if cell at i,j is alive
board[i][j] = 0 if cell at i,j is dead
Problem:
- jp January 06, 2011public static int[][] nextConfig(int[][] board) { //code to calculate next board configuration //return new config }
| Report Duplicate | Flag | PURGE
Google Developer Program Engineer Coding - 0of 0 votes
AnswersOpen ended question:
- jp January 06, 2011
In Google apps or google app engine google limits the rate at which an application can fire queries at google systems(e.g. REST or any other API calls). This rate is determined dynamically by Google and it is changing continuously changing. Devise an algorithm to determine the optimal rate at which applications can fire requests (calling google APIs).
Note: for simplicity lets assume that
1. if application exceeds the rate limit Google returns 503
2. and return 200 for successful API call.| Report Duplicate | Flag | PURGE
Google Developer Program Engineer - 1of 1 vote
AnswersGiven a directed graph G, write a program to detect the cycle in it.
- jp January 06, 2011| Report Duplicate | Flag | PURGE
Google Developer Program Engineer Algorithm