61
Google interview Questions ............ Google Interview Questions: Product Marketing Manager 1) Why do you want to join Google? 2) What do you know about Google’s product and technology? 3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product seminar? 5) Who are Google competitors, and how does Google compete with them? 6) Have you ever used Google’s products? Gmail? 7) What’s a creative way of marketing Google’s brand name and product? 8) If you are the product marketing manager for Google’s Gmail product, how do you plan to market it so as to achieve 100 million customers in 6 months? Google Interview Questions: Product Manager 1) How would you boost the GMail subscription base? 2) What is the most efficient way to sort a million integers? 3) How would you re-position Google’s offerings to counteract competitive threats from Microsoft? 4) How many golf balls can fit in a school bus?

technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

Google interview Questions ............

Google Interview Questions: Product Marketing Manager

1) Why do you want to join Google?

2) What do you know about Google’s product and technology?

3) If you are Product Manager for Google’s Adwords, how do you plan to market this?

4) What would you say during an AdWords or AdSense product seminar?

5) Who are Google competitors, and how does Google compete with them?

6) Have you ever used Google’s products? Gmail?

7) What’s a creative way of marketing Google’s brand name and product?

8) If you are the product marketing manager for Google’s Gmail product, how do you plan to market it so as to achieve 100 million customers in 6 months?

Google Interview Questions: Product Manager

1) How would you boost the GMail subscription base?

2) What is the most efficient way to sort a million integers?

3) How would you re-position Google’s offerings to counteract competitive threats from Microsoft?

4) How many golf balls can fit in a school bus?

5) You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seconds. What do you do?

6) How much should you charge to wash all the windows in Seattle?

7) How would you find out if a machine’s stack grows up or down in memory?

8) Explain a database in three sentences to your eight-year-old nephew.

Page 2: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

9) How many times a day does a clock’s hands overlap?

10) You have to get from point A to point B. You don’t know if you can get there. What would you do?

11) Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?

12) Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?

13) In a country in which people only want boys, every family continues to have children until they have a boy. If they have a girl, they have another child. If they have a boy, they stop. What is the proportion of boys to girls in the country?

14) If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)?If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands? (The answer to this is not zero!)

15) Four people need to cross a rickety rope bridge to get back to their camp at night. Unfortunately, they only have one flashlight and it only has enough light left for seventeen minutes. The bridge is too dangerous to cross without a flashlight, and it’s only strong enough to support two people at any given time. Each of the campers walks at a different speed. One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 minutes, and the slow poke takes 10 minutes to cross. How do the campers make it across in 17 minutes?

16) You are at a party with a friend and 10 people are present including you and the friend. your friend makes you a wager that for every person you find that has the same birthday as you, you get $1; for every person he finds that does not have the same birthday as you, he gets $2. would you accept the wager?

17) How many piano tuners are there in the entire world?

Page 3: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

18) You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you find the ball that is heavier by using a balance and only two weighing?

19) You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it? (Hint: One pirate ends up with 98 percent of the gold.)

20) You are given 2 eggs. You have access to a 100-story building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100th floor. Both eggs are identical. You need to figure out the highest floor of a 100-story building an egg can be dropped without breaking. The question is how many drops you need to make. You are allowed to break 2 eggs in the process.Describe a technical problem you had and how you solved it.

21) How would you design a simple search engine?

22) Design an evacuation plan for San Francisco.

23) There’s a latency problem in South Africa. Diagnose it.

24) What are three long term challenges facing google?

Google Interview Questions: Software Engineer

1. Why are manhole covers round?

2. What is the difference between a mutex and a semaphore? Which one would you use to protect access to an increment operation?

3. A man pushed his car to a hotel and lost his fortune. What happened?

4. Explain the significance of “dead beef”.

5. Write a C program which measures the the speed of a context switch on a UNIX/Linux system.

6. Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.

7. Describe the algorithm for a depth-first graph traversal.8. Design a class library for writing card games.

Page 4: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. You must write a the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number?

9. How are cookies passed in the HTTP protocol?

10. Design the SQL database tables for a car rental database.

11. Write a regular expression which matches a email address.

12. Write a function f(a, b) which takes two character string arguments and returns a string containing only the characters found in both strings in the order of a. Write a version which is order N-squared and one which is order 

13. You are given a the source to a application which is crashing when run. After running it 10 times in a debugger, you find it never crashes in the same place. The application is single threaded, and uses only the C standard library. What programming errors could be causing this crash?

14. How would you test each one?

15. Explain how congestion control works in the TCP protocol.

16. In Java, what is the difference between final, finally, and finalize?

17. What is multithreaded programming? What is a deadlock?Write a function (with helper functions if needed) called to Excel that takes an excel column value (A,B,C,D…AA,AB,AC,… AAA..) and returns a corresponding integer value (A=1,B=2,… AA=26..).

18. You have a stream of infinite queries (ie: real time Google search queries that people are entering). Describe how you would go about finding a good estimate of 1000 samples from this never ending set of data and then write code for it.

19. Tree search algorithms. Write BFS and DFS code, explain run time and space requirements. Modify the code to handle trees with weighted edges and loops with BFS and DFS, make the code print out path to goal state

20. You are given a list of numbers. When you reach the end of the list you will come back to the beginning of the list (a circular list). Write the most efficient algorithm to find the minimum # in this list. Find any given # in the

Page 5: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

list. The numbers in the list are always increasing but you don’t know where the circular list begins, ie: 38, 40, 55, 89, 6, 13, 20, 23, 36.

21. Describe the data structure that is used to manage memory. (stack)

22. What’s the difference between local and global variables?

23. If you have 1 million integers, how would you sort them efficiently? (modify a specific sorting algorithm to solve this)

24. In Java, what is the difference between static, final, and const. (if you don’t know Java they will ask something similar for C or C++).

25. Talk about your class projects or work projects (pick something easy)… then describe how you could make them more efficient (in terms of algorithms).

26. Suppose you have an NxN matrix of positive and negative integers. Write some code that finds the sub-matrix with the maximum sum of its elements.

27. Write some code to reverse a string.Implement division (without using the divide operator, obviously).

28. Write some code to find all permutations of the letters in a particular string.

29. What method would you use to look up a word in a dictionary?Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?

30. You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you fine the ball that is heavier by using a balance and only two weighings?

31. What is the C-language command for opening a connection with a foreign host over the internet?

32. Design and describe a system/application that will most efficiently produce a report of the top 1 million Google search requests. These are the particulars: 1) You are given 12 servers to work with. They are all dual-processor machines with 4Gb of RAM, 4x400GB hard drives and networked together.(Basically, nothing more than high-end PC’s) 2) The log data has already been cleaned for you. It consists of 100 Billion log lines, broken down into 12 320 GB files of 40-byte search terms per line. 3) You can use only custom written applications or available free open-source software.

Page 6: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

33. There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal to multiplication of all the elements of A[N] except A[i]. For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1] will be multiplication of A[0] and from A[2] to A[N-1]. Solve it without division operator and in O(n).

34. There is a linked list of numbers of length N. N is very large and you don’t know N. You have to write a function that will return k random numbers from the list. Numbers should be completely random. Hint: 1. Use random function rand() (returns a number between 0 and 1) and irand() (return either 0 or 1) 2. It should be done in O(n).

35. Find or determine non existence of a number in a sorted list of N numbers where the numbers range over M, M>> N and N large enough to span multiple disks. Algorithm to beat O(log n) bonus points for constant time algorithm.

36. You are given a game of Tic Tac Toe. You have to write a function in which you pass the whole game and name of a player. The function will return whether the player has won the game or not. First you to decide which data structure you will use for the game. You need to tell the algorithm first and then need to write the code. Note: Some position may be blank in the game। So your data structure should consider this condition also.

37. You are given an array [a1 To an] and we have to construct another array [b1 To bn] where bi = a1*a2*…*an/ai. you are allowed to use only constant space and the time complexity is O(n). No divisions are allowed.

38. How do you put a Binary Search Tree in an array in a efficient manner. Hint :: If the node is stored at the ith position and its children are at 2i and 2i+1(I mean level order wise)Its not the most efficient way.

39. How do you find out the fifth maximum element in an Binary Search Tree in efficient manner. Note: You should not use use any extra space. i.e sorting Binary Search Tree and storing the results in an array and listing out the fifth element.

40. Given a Data Structure having first n integers and next n chars. A = i1 i2 i3 … iN c1 c2 c3 … cN.Write an in-place algorithm to rearrange the elements of the array ass A = i1 c1 i2 c2 … in cn

41. Given two sequences of items, find the items whose absolute number increases or decreases the most when comparing one sequence with the other by reading the sequence only once.

Page 7: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

42. Given That One of the strings is very very long , and the other one could be of various sizes. Windowing will result in O(N+M) solution but could it be better? May be NlogM or even better?

43. How many lines can be drawn in a 2D plane such that they are equidistant from 3 non-collinear points?Let’s say you have to construct Google maps from scratch and guide a person standing on

44. Gateway of India (Mumbai) to India Gate(Delhi). How do you do the same?

45. Given that you have one string of length N and M small strings of length L. How do you efficiently find the occurrence of each small string in the larger one?

46. 47. Given a binary tree, programmatically you need to prove it is a binary search tree.You are given a small sorted list of numbers, and a very very long sorted list of numbers – so long that it had to be put on a disk in different blocks. How would you find those short list numbers in the bigger one?

48. Suppose you have given N companies, and we want to eventually merge them into one big company. How many ways are theres to merge?

49. Given a file of 4 billion 32-bit integers, how to find one that appears at least twice?

50. Write a program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.

51. Design a stack. We want to push, pop, and also, retrieve the minimum element in constant time.

52. Given a set of coin denominators, find the minimum number of coins to give a certain amount of change.

53. Given an array, i) find the longest continuous increasing subsequence. ii) find the longest increasing subsequence.

54. Suppose we have N companies, and we want to eventually merge them into one big company.

55. How many ways are there to merge?

Page 8: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

56. Write a function to find the middle node of a single link list.

57. Given two binary trees, write a compare function to check if they are equal or not. Being equal means that they have the same value and same structure.Implement put/get methods of a fixed size cache with LRU replacement algorithm.

58. You are given with three sorted arrays ( in ascending order), you are required to find a triplet ( one element from each array) such that distance is minimum.

59. Distance is defined like this : If a[i], b[j] and c[k] are three elements then distance=max(abs(a[i]-b[j]),abs(a[i]-c[k]),abs(b[j]-c[k]))” Please give a solution in O(n) time complexity

60. How does C++ deal with constructors and deconstructors of a class and its child class?

61. Write a function that flips the bits inside a byte (either in C++ or Java). Write an algorithm that take a list of n words, and an integer m, and retrieves the mth most frequent word in that list.

62. What’s 2 to the power of 64?

63. Given that you have one string of length N and M small strings of length L. How do you efficiently find the occurrence of each small string in the larger one?

64. How do you find out the fifth maximum element in an Binary Search Tree in efficient manner.

65. Suppose we have N companies, and we want to eventually merge them into one big company.

66. How many ways are there to merge?There is linked list of millions of node and you do not know the length of it. Write a function which will return a random number from the list.

67. You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. You must write a the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number?

Page 9: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

68. How long it would take to sort 1 trillion numbers? Come up with a good estimate.Order the functions in order of their asymptotic performance: 1) 2^n 2) n^100 3) n! 4) n^nThere are some data represented by(x,y,z). Now we want to find the Kth least data. We say (x1, y1, z1) > (x2, y2, z2) when value(x1, y1, z1) > value(x2, y2, z2) where value(x,y,z) = (2^x)*(3^y)*(5^z). Now we can not get it by calculating value(x,y,z) or through other indirect calculations as lg(value(x,y,z)). How to solve it?

69. How many degrees are there in the angle between the hour and minute hands of a clock when the time is a quarter past three?

70. Given an array whose elements are sorted, return the index of a the first occurrence of a specific integer. Do this in sub-linear time. I.e. do not just go through each element searching for that element.

71. Given two linked lists, return the intersection of the two lists: i.e. return a list containing only the elements that occur in both of the input lists.

72. What’s the difference between a hashtable and a hashmap?

73. If a person dials a sequence of numbers on the telephone, what possible words/strings can be formed from the letters associated with those numbers?

74. How would you reverse the image on an n by n matrix where each pixel is represented by a bit?

75. Create a fast cached storage mechanism that, given a limitation on the amount of cache memory, will ensure that only the least recently used items are discarded when the cache memory is reached when inserting a new item. It supports 2 functions: String get(T t) and void put(String k, T t).

76. Create a cost model that allows Google to make purchasing decisions on to compare the cost of purchasing more RAM memory for their servers vs. buying more disk space.

77. Design an algorithm to play a game of Frogger and then code the solution. The object of the game is to direct a frog to avoid cars while crossing a busy road. You may represent a road lane via an array. Generalize the solution for an N-lane road.

78. What sort would you use if you had a large data set on disk and a small amount of ram to work with?

Page 10: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

79. What sort would you use if you required tight max time bounds and wanted highly regular performance.

80. How would you store 1 million phone numbers?

81. Design a 2D dungeon crawling game. It must allow for various items in the maze – walls, objects, and computer-controlled characters. (The focus was on the class structures, and how to optimize the experience for the user as s/he travels through the dungeon.)

82. What is the size of the C structure below on a 32-bit system? On a 64-bit?struct foo {char a; char* b; };

Google Interview: Software Engineer in Test

1. Efficiently implement 3 stacks in a single array.

2. Given an array of integers which is circularly sorted, how do you find a given integer.

3. Write a program to find depth of binary search tree without using recursion.

4. Find the maximum rectangle (in terms of area) under a histogram in linear time.

5. Most phones now have full keyboards. Before there there three letters mapped to a number button. Describe how you would go about implementing spelling and word suggestions as people type.

6. Describe recursive mergesort and its runtime. Write an iterative version in C++/Java/Python.

7. How would you determine if someone has won a game of tic-tac-toe on a board of any size?

8. Given an array of numbers, replace each number with the product of all the numbers in the array except the number itself *without* using division.

9. Create a cache with fast look up that only stores the N most recently accessed items.10. How to design a search engine? If each document contains a set of

Page 11: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

keywords, and is associated with a numeric attribute, how to build indices?

11. Given two files that has list of words (one per line), write a program to show the intersection.

Google Interview: Quantitative Compensation Analyst

How many resumes does Google receive each year for software engineering?

Anywhere in the world, where would you open up a new Google office and how would you figure out compensation for all the employees at this new office?

What is the probability of breaking a stick into 3 pieces and forming a triangle

Google Interview: Engineering Manager

You’re the captain of a pirate ship, and your crew gets to vote on how the gold is divided up. If fewer than half of the pirates agree with you, you die. How do you recommend apportioning the gold in such a way that you get a good share of the booty, but still survive? 

1) Given four matricesP = 20×10Q = 10×5R = 5×10S = 10×10Find minimum no. of multiplication required for PxQxRxS?a) 4000b) 2500c) 3000d) None Of These

2) Two n-size arays are given . n1 in decreasing order and n2 in increasing order. If c1 is time complexity for n1 using quicksort and c2 is time complexity for n2 using quicksort. Then –a) c1 > c2b) c1 < c2c) c1 = c2d) None of these

Page 12: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

3) If there is a N sorted array then what is time complexity of finding 2 no.s having sum less than 1000.a) O(1)b) O(n^2)c) O(n)d) O(logn)

4) There are some process . In which of the scheduling algo CPU utilization is minimum. If I/O burst time is 90ms and CPU burst time is 10ms.(question is very long to remember)

5)

int func(int x, int *y, int **z){int p, q;x += 2;p = *y++;q = **z++;q = **z++; //Not a repeated line.}void main(){int a = 5, *b, **c;b = &a;c = &b;printf(“%d”,a);}6) Find the least significant digit of 2^3*google where google=10^100.a) 2b) 4c) 6d) 8

7) Let w(n) and A(n) denote respectively, the worst case and average case running time of an algorithm executed on an input of size n. which of the following is ALWAYS TRUE?a) A(n) = Omega(W(n))b) A(n) = Theta(W(n))c) A(n) = O(W(n))d) A(n) = o(W(n))

8) Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry Wij in the matrix W below is the weight of the edge {i, j}.

Page 13: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

0 1 8 1 41 0 12 4 9W = 8 12 0 7 31 4 7 0 24 9 3 2 0What is the minimum possible weight of a spanning tree T in this graph such that vertex 0 is a leaf node in the tree T?a) 7b) 8c) 9d) 10

9) In the graph given in question 8, what is the minimum possible weight of a path P from vertex 1 to vertex 2 in this graph such that P contains at most 3 edges?a) 7b) 8c) 9d) 10

10) A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below.

|0| | |1| ||2| 42||3| 23||4| 34||5| 52||6| 46||7| 33||8| ||9| |Which one of the following choices gives a possible order in which the key values could have been inserted in the table?a) 46, 42, 34, 52, 23, 33b) 34, 42, 23, 52, 33, 46c) 46, 34, 42, 23, 52, 33d) 42, 46, 33, 23, 34, 52

11) How many different insertion sequences of the key values using the same hash function of question 10 and linear probing will result in the hash table shown above?a) 10b) 20

Page 14: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

c) 30d) 40

12) The recurrence relation capturing the optimal time of the Tower of Hanoi problem with n discs isa) T(n) = 2T(n – 2) + 2b) T(n) = 2T(n – 1) + nc) T(n) = 2T(n/2) + 1d) T(n) = 2T(n – 1) + 1

13) Given three semaphores, S0, S1 and S2 initialized as S0=1, S1=0, S2=0 and processes P0, P1 and P2.

P0 : while(true)P0, P1 and P2.P0 : while(true){wait(S0);printf(“ 0 “);Release(S1);Release(S2);}P1: while(true){Wait(S1);Release(S2);}P2: while(true){Wait(S2);Release(S0);} Find out how many times the process P0 executes printf statement.a) At least twiceb) Exactly oncec) Exactly twiced) Exactly thrice

14) Given the following program construct

{if ( a == b ) { S1; exit(); }else if ( c==d ) { S2; }else { S3; exit(); }S4;} 

Page 15: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

Given 4 test cases, find out which one among the following covers all the 4 statementsT1: a, b, c and d are same.T2: a, b, c and d are all distinct.T3: a == b and c != d.T4: a != b and c==d.a) T1, T2 & T3;b) T1, T4.c) T2, T4.d) T1, T2 & T4.

15) Which of the following statements are true?I. Shortest remaining time first scheduling may cause starvationII. Preemptive scheduling may cause starvationIII. Round robin is better than FCFS in terms of response timea) I onlyb) I and III onlyc) II and III onlyd) I, II and III

16) Sequences of logical pages access :1 2 3 2 4 1 3 2 4 1Implemented Optimal,LRU,FIFO Page replacement techniques.Then no. of page faults in :a) Optimal < LRU < FIFOb) Optimal < FIFO < LRUc) Optimal = FIFOd) None

17) Find the no. of page faults for Optimal Page replacement technique in the given sequence of question no. 16.a) 5b) 6c) 7d) 8

18) Given a simple graph of 6 nodes (note- it’s a simple graph) then tell which of the following is a set of valid graph degrees.a) 4,4,1,1,1,1b) 4,4,2,1,1,1c) 4,4,2,2,1,1d) None

19)

gcd(n,m)

Page 16: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

{if (n%m == 0)return n;n = n%m;return gcd ( m, n);} What is the complexity of calculating gcd(n, m) in worst case?a) O(lgn)b) O(lgm)c) O(lg(lgn))d) O(lg(lgm))

20)

void f(char * x){x++;*x = 'a';}int main(){char * str = "hello";f(str);cout << str;system("pause");return 0;} a) hellob) halloc) allod) empty string

There were multiple objective questions and a single coding question. The focus of the paper was how quickly you could solve the general ability questions. The time limit was 1 hour.

The written test had 3 objective question sets and 2 coding question. Instead of fixing marks for each question, they had given a weightage estimate by giving suggested time interval for each question.

All objective question were given 1 min each, 1st coding question was 30

Page 17: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

minutes and the 2nd question was suggested 45 minutes. All questions were just given estimated time intervals, and the entire paper was given at one go, with a total time of 1 hour 30 minutes. 

Although the function prototypes for the coding questions were given with STL containers but you could use any language that suited you. Obviously using C++ STL or a similar construct in other languages such as Java was appreciated.

For each of the coding question an optional space was given for writing the logic. Although the logic was optional, but we seriously recommend you to give your logic. It makes much easier for the checker to understand your answer and increases your chances.

1 Given preorder traversal of a Binary Search Tree. From the given options you have to select which one can possibly be the inorder traversal of the tree.

2 If you could find the (n/4)th element of an array in O(n) time, then what is the worst time complexity of quick sort algo if this algo is used to decide the pivot element.

3 Find the min no of comparisons required to find both the max and min elements of an array containing 20 elements.

4 If an array[0...m-1,0....n-1] is stored in column major format how will u find the (i,j) element ?

5 If an insurance company pays $5000 for complete loss, $1500 in case of a loss of $2000 and more and nothing in case the loss is less that $2000. It obviously pays nothing in case of no loss. If the probability of the first 3 events are 0.02,0.10 and 0.3 , find what should the company charge in order to make a profit of $50 from each customer ?

6 The prob of finding the parking slot occupied is 1/3. You find it empty for 9 consecutive days. Find the prob that it will be empty on the 10th day.

7 Consider a NxN matrix in which the elements are either 0 or 1. Find how many such matrixes are possible that are symmetric in nature(the matrix and its transpose count as 1.

8 1<=i,j,k<=300.Find (i,j,k) pairs such that their sum is divisible by 3. (2,2,1) and (2,1,2) are counted as different.

Page 18: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

9 In the loop given below    int counter=0;        for(i=0;i<10;i++)            for(j=i+1;j<10;j++)                for(k=j+1;k<10;k++)                    for(l=k+1;l<10;l++)f                        For(m=l+1;m<10;m++)                                counter++;

10 Find the value of counter in the end.

11 Consider a set S of the first 10 natural numbers. Find the number of subsets that do not contain consecutive elements.

12 A disk contains 16 partition unit , each unit contains 128 subunits, and each subunit contains 256 sectors of 512 byte each. Find out what is total storage capacity? Also find out the no of bits required to identify each sector?

13 Which of the following is not a Regular Language :

None given(0^i).(1^j) such that i(0^i).w.(1^j) such that w belongs to {0,1}* and i >= 0such that every pth input digit is 0 where p is a prime number.

14 Find the output

void f(char * x){x++;*x='a';} 

int main(){char * str="hello";f(str);cout << str;system("pause");return 0;}

hellohalloallo

Page 19: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

empty string

15 Given an sorted array, what is the complexity of finding weather a number is present n/2 times or not.O(lgn)O(n)O((lgn)2)O(1)

The weight of a squence a0, a1,a2,... ,an is defined as a0+a1/2+a2/(2^2)+...+an/(2^(n)). A subsequence of a sequence is said to be a sequence with some of the elements deleted from the original sequence but the order of the sequence remaining the same. Now let X be the maximum weight for a subsequence of a sequence a0,a1,a2,a3..,an. And Y be the maximum weight for a subsequence of the sequence a1,a1,a2,a3.....,an. Then X in terms of Y ismax(Y,a0+Y)max(Y,a0+Y/2)max(Y,a0+2*Y)a0+Y/2

16 What is the complexity for finding all the leaders in an array? A leader is defined as an element which is greater than all the elements to its right.

17 For each of the following problems, give the programming paradigm used to solve it.Travelling Salesman ProblemDijkstra Shortest Path AlgorithmEuclid GCD AlgorithmBinary searchKruskal's Minimum Spanning TreeTower of Hanoi

18 For each of the following operations, give the worst case time complexity:Travelling Salesman ProblemDijkstra Shortest Path AlgorithmEuclid GCD AlgorithmBinary searchKruskal's Minimum Spanning TreeTower of Hanoi

19 For each of the following which protocol would you use:Live video streamingHTTPDNS

Page 20: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

Subjective Questions

1 Write a program to find the index in an circular array such that the string that is formed starting from that index is first in lexicographic order. For example in the circular array ABCDEABCCDE

2 You are given an array of n elements [1,2,....n]. For example {3,2,1,6,7,4,5}.

3 Now we create a signature of this array by comparing every consecutive pir of elements. If they increase, write I else write D. For example for the above array, the signature would be "DDIIDI". The signature thus has a length of N-1. Now the question is given a signature, compute the lexicographically smallest permutation of [1,2,....n]. Write the below function in language of your choice.

4 ector* FindPermute(const string& signature);

5 A list of strings is given. Find the number of non-anagramic strings in the list i.e. the number of strings which do not have any anagram int the list.

int FindMaxSubset(const vector & v)

1. 5,5,,13,13,21,21  Ans: 29

2. 0,7,26,63,124,  Ans: 215 i.e.n**3-1 rule following

3. 1,3,5,7,  Ans: 9 '1' is not a prime number

4. If a person walks at 4/5th of his usual spee he reaches 40min late. If  he walks athis usual speed how much time does he travels. Ans:160min or 2hr 40min

5. Two trains A&B start at opposite points 120km at 60kmph. A fly  starting along with train A at 120kmph reaches B then returns back to  touch and continue. By the time two trains meet howmuch distance the fly  would have travelled?Ans : By 1hour both trains meet, so the distance travel by fly in 1hr is 120km.

Page 21: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

 

6. In a class 80% have passed english,70% passed Hindi 10% didnot passed either. If 144 students passed both. What is the total strength of the class.  Ans: 240

7. Find the least number when divided by 7 gives the reminder 6, when divided by 6 gives reminder 5, when divided by 5 gives reminder 4 and so on.... Ans: 419

8. If a man stands in front of sun what is the first letter of the direction which is left to him:Ans: North(N)

9. A square is to circle what is cube to Ans: sphere10. Synonymsi) Joy = gayii) Inert = Inactive

11. One wordswill begiven find oddman out: Ans:sickle like thata) sow         b) cut         c)         d) sickel

Google Aptitude Questions

12. If I bought a cycle before 2days of my birthday and I broke it after 3 days of my birthday the day I broke is Mar2, 1956? Answer following logical questions? i) When is his birthday?

Ans: April,28 (due to leap year i.e.1956) but do not keep answer blindly we just think before choosing answer Iam just giving idea of question

 

14. What is my father's sons son to my son? Ans: cousin brother

15. On cutting which solid parabola would be generated  Ans: cone

Page 22: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

16. Eulers formula:  Ans: F+V-E=2;F= faces; V= vertices; E = number of edges

17. Newton Rapson method is to find  Ans:to find the root of f(x) = 0;

18. How many tangents can be dran within three circles if they donot lie within each otherAns : 12 But this answer is not there I kept 8 as answer

19. In language the fortran which is true. A) fortran uses call by value

20. When a program is compiled what it producesAns:source code to object code

21. In the following venn diagram shaded region is represented by some question like that I can't draw figure here thats why Iam sendinganswer onlyAns: (B-A)' i.e. (B-A) whole dash

22. xy-x+2y = 6 equation is shifted to form equation xy=c what is c? Ans : 4

23.When x is real what is the least value of (x**2-6*x+5)/(x**2+2*x+1) Ans:-1/3

Google Technical questions

24. What is the mistake in the following program segment ?f(){int a;void c;f2(&c,&a);}

 

 

Page 23: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

25.a=0;b=(a=0)?2:3;a) What will be the value of b and why ?b) If in first statement a=0 is replaced by a = -1, b= ?c) If in second statement a=0 is replaced by a = -1, b=?

26.char *a[2];int const *p;int *const p;struct new { int a;int b; *var[5] (struct new)}Describe the statements in the above given construct ?

27.f(){int a=2;f1(a++);}f1(int c){printf("%d", c);}What is the value of c ?

 

28.f1(){f(3);}f(int t){switch(t);{case 2: c=3;case 3: c=4;case 4: c=5;case 5: c=6;default: c=0;}What is the value of c?

Page 24: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

29 Write a haiku describing possible methods for predicting search traffic seasonality.MathWorld's search engine seemed slowed this May. Undergrads prepping for finals.

Q 30.11 12 11 2 1 11 1 1 2 2 1What's the next line?

 

 

31 2211. This is the "look and say" sequence in which each term after the first describes the previous term: one 1 (11); two 1s (21); one 2 and one 1 (1211); one 1, one 2, and two 1's (111221); and so on. See the look and say sequence entry on MathWorld for a complete write-up and the algebraic form of a fascinating related quantity known as Conway's constant.

31. You are in a maze of twisty little passages, all alike. There is a dusty laptop here with a weak wireless connection. There are dull, lifeless gnomes strolling around. What dost thou do?A) Wander aimlessly, bumping into obstacles until you are eaten by a grue.B) Use the laptop as a digging device to tunnel to the next level.C) Play MPoRPG until the battery dies along with your hopes.D) Use the computer to map the nodes of the maze and discover an exit path.E) Email your resume to Google, tell the lead gnome you quit and find yourself in whole different world [sic].In general, make a state diagram . However, this method would not work in certain pathological cases such as, say, a fractal maze. For an example of this and commentary, see Ed Pegg's column about state diagrams and mazes .

32. What's broken with Unix? Their reproductive capabilities.How would you fix it?

Page 25: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

33 On your first day at Google, you discover that your cubicle mate wrote the textbook you used as a primary resource in your first year of graduate school. Do you:A) Fawn obsequiously and ask if you can have an autograph.B) Sit perfectly still and use only soft keystrokes to avoid disturbing her concentrationC) Leave her daily offerings of granola and English toffee from the food bins.D) Quote your favorite formula from the textbook and explain how it's now your mantra.E) Show her how example 17b could have been solved with 34 fewer lines of code.

34. Which of the following expresses Google's over-arching philosophy?A) "I'm feeling lucky"B) "Don't be evil"C) "Oh, I already fixed that"D) "You should never be more than 50 feet from food"E) All of the above

35. How many different ways can you color an icosahedron with one of three colors on each face?For an asymmetric 20-sided solid, there are possible 3-colorings . For a symmetric 20-sided object, the Polya enumeration theorem can be used to obtain the number of distinct colorings. Here is a concise Mathematica implementation:What colors would you choose?

36. This space left intentionally blank. Please fill it with something that improves upon emptiness.For nearly 10,000 images of mathematical functions, see The Wolfram Functions Site visualization gallery .

37. On an infinite, two-dimensional, rectangular lattice of 1-ohm resistors, what is the resistance between two nodes that are a knight's move away?This problem is discussed in J. Cserti's 1999 arXiv preprint . It is also discussed in The Mathematica GuideBook for Symbolics, the forthcoming fourth volume in Michael Trott's GuideBook series, the first two of which were published just last week by Springer-Verlag. The contents for all four GuideBooks, including the two not yet published, are available on the DVD distributed with the first two GuideBooks.

Page 26: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

38. It's 2PM on a sunny Sunday afternoon in the Bay Area. You're minutes from the Pacific Ocean, redwood forest hiking trails and world class cultural attractions. What do you do?

39. In your opinion, what is the most beautiful math equation ever derived?There are obviously many candidates. The following list gives ten of the authors' favorites:1. Archimedes' recurrence formula : , , ,2. Euler formula :3. Euler-Mascheroni constant :4. Riemann hypothesis: and implies5. Gaussian integral :6. Ramanujan's prime product formula:7. Zeta-regularized product :8. Mandelbrot set recursion:9. BBP formula :10. Cauchy integral formula:

40. Which of the following is NOT an actual interest group formed by Google employees?A. Women's basketball B. Buffy fans C. Cricketeers D. Nobel winners E. Wine club

41. What will be the next great improvement in search technology?

42. What is the optimal size of a project team, above which additional members do not contribute productivity equivalent to the percentage increase in the staff size?A) 1 B) 3 C) 5 D) 11 E) 24

43. Given a triangle ABC, how would you use only a compass and straight edge to find a point P such that triangles ABP, ACP and BCP have equal perimeters? (Assume that ABC is constructed so that a solution does exist.)This is the isoperimetric point , which is at the center of the larger Soddy circle. It is related to Apollonius' problem . The three tangent circles are easy to construct: The circle around has diameter , which gives the other two circles. A summary of compass and straightedge constructions for the outer Soddy circle can be found in " Apollonius' Problem: A Study of Solutions and Their Connections" by David Gisch and Jason M. Ribando.

Page 27: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

44.

{long l=1024;int i=1;while(l>=1){ l=l/2;i=i+1;}}a)8 b)11 c)10 d)100 ans:b

45 This question is based on the complexity ...

Q3) s->ABA->aB->bbAWhich one is false for above grammar.

46 Some Tree were given & the question is to fine preorder traversal.

47. One c++ program,to find output of the program..

48. If the mean failure hour is 10,000 and 20 is the mean repair hour. If the printer is used by 100 customer, then find the availability. 1)80% 2)90% 3)98% 4)99.8% 5)100%

1. Solve this cryptic equation, realizing of course that values for M and E could be interchanged. No leading zeros are allowed.WWWDOT - GOOGLE = DOTCOMThis can be solved through systematic application of logic. For example, cannot be equal to 0, since . That would make , but , which is not possible.Here is a slow brute-force method of solution that takes a few minutes on a relatively fast machine:

This gives the two solutions777589 - 188106 == 589483

Page 28: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

777589 - 188103 == 589486Here is another solution using Mathematica's Reduce command:A faster (but slightly more obscure) piece of code is the following:Faster still using the same approach (and requiring ~300 MB of memory):Even faster using the same approach (that does not exclude leading zeros in the solution, but that can easily be weeded out at the end):Here is an independent solution method that uses branch-and-prune techniques:And the winner for overall fastest:

2. Write a haiku describing possible methods for predicting search traffic seasonality.MathWorld's search engineseemed slowed this May. Undergradsprepping for finals.3. 11 12 11 2 1 11 1 1 2 2 1What's the next line?

312211. This is the "look and say" sequence in which each term after the first describes the previous term: one 1 (11); two 1s (21); one 2 and one 1 (1211); one 1, one 2, and two 1's (111221); and so on. See the look and say sequence entry on MathWorld for a complete write-up and the algebraic form of a fascinating related quantity known as Conway's constant.

4. You are in a maze of twisty little passages, all alike. There is a dusty laptop here with a weak wireless connection. There are dull, lifeless gnomes strolling around. What dost thou do?A) Wander aimlessly, bumping into obstacles until you are eaten by a grue.B) Use the laptop as a digging device to tunnel to the next level.C) Play MPoRPG until the battery dies along with your hopes.D) Use the computer to map the nodes of the maze and discover an exit path.E) Email your resume to Google, tell the lead gnome you quit and find yourself in whole different world [sic].In general, make a state diagram . However, this method would not work in certain pathological cases such as, say, a fractal maze. For an example of this and commentary, see Ed Pegg's column about state diagrams and mazes .

5. What's broken with Unix?Their reproductive capabilities.How would you fix it?

Page 29: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

6. On your first day at Google, you discover that your cubicle mate wrote the textbook you used as a primary resource in your first year of graduate school. Do you:A) Fawn obsequiously and ask if you can have an autograph.B) Sit perfectly still and use only soft keystrokes to avoid disturbing her concentrationC) Leave her daily offerings of granola and English toffee from the food bins.D) Quote your favorite formula from the textbook and explain how it's now your mantra.E) Show her how example 17b could have been solved with 34 fewer lines of code.

7. Which of the following expresses Google's over-arching philosophy?A) "I'm feeling lucky"B) "Don't be evil"C) "Oh, I already fixed that"D) "You should never be more than 50 feet from food"E) All of the above

8. How many different ways can you color an icosahedron with one of three colors on each face?For an asymmetric 20-sided solid, there are possible 3-colorings . For a symmetric 20-sided object, the Polya enumeration theorem can be used to obtain the number of distinct colorings. Here is a concise Mathematica implementation:What colors would you choose?

9. This space left intentionally blank. Please fill it with something that improves upon emptiness.For nearly 10,000 images of mathematical functions, see The Wolfram Functions Site visualization gallery .

10. On an infinite, two-dimensional, rectangular lattice of 1-ohm resistors, what is the resistance between two nodes that are a knight's move away?This problem is discussed in J. Cserti's 1999 arXiv preprint . It is also discussed in The Mathematica GuideBook for Symbolics, the forthcoming fourth volume in Michael Trott's GuideBook series, the first two of which were published just last week by Springer-Verlag. The contents for all four GuideBooks, including the two not yet published, are available on the DVD distributed with the first two GuideBooks.

Page 30: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

11. It's 2PM on a sunny Sunday afternoon in the Bay Area. You're minutes from the Pacific Ocean, redwood forest hiking trails and world class cultural attractions. What do you do?

12. In your opinion, what is the most beautiful math equation ever derived?There are obviously many candidates. The following list gives ten of the authors' favorites:1. Archimedes' recurrence formula : , , ,

2. Euler formula 

3. Euler-Mascheroni constant :

4. Riemann hypothesis: and implies

5. Gaussian integral :

6. Ramanujan's prime product formula:

7. Zeta-regularized product :

8. Mandelbrot set recursion:

9. BBP formula :

10. Cauchy integral formula:An excellent paper discussing the most beautiful equations in physics is Daniel Z. Freedman's " Some beautiful equations of mathematical physics ." Note that the physics view on beauty in equations is less uniform than the mathematical one. To quote the not-necessarily-standard view of theoretical physicist P.A.M. Dirac, "It is more important to have beauty in one's equations than to have them fit experiment."

13. Which of the following is NOT an actual interest group formed by Google employees?A. Women's basketballB. Buffy fansC. CricketeersD. Nobel winnersE. Wine club

14. What will be the next great improvement in search technology?Semantic searching of mathematical formulas. .html for work currently underway at Wolfram Research that will be made available in the near future.

Page 31: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

15. What is the optimal size of a project team, above which additional members do not contribute productivity equivalent to the percentage increase in the staff size?A) 1B) 3C) 5D) 11E) 24

16. Given a triangle ABC, how would you use only a compass and straight edge to find a point P such that triangles ABP, ACP and BCP have equal perimeters? (Assume that ABC is constructed so that a solution does exist.)This is the isoperimetric point , which is at the center of the larger Soddy circle. It is related to Apollonius' problem . The three tangent circles are easy to construct: The circle around has diameter , which gives the other two circles. A summary of compass and straightedge constructions for the outer Soddy circle can be found in " Apollonius' Problem: A Study of Solutions and Their Connections" by David Gisch and Jason M. Ribando.

17. Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n. For example, f(13)=6. Notice that f(1)=1. What is the next largest n such that f(n)=n?The following Mathematica code computes the difference between [the cumulative number of 1s in the positive integers up to n] and [the value of n itself] as n ranges from 1 to 500,000:The solution to the problem is then the first position greater than the first at which data equals 0:which are the first few terms of sequence A014778 in the On-Line Encyclopedia of Integer Sequences.Checking by hand confirms that the numbers from 1 to 199981 contain a total of 199981 1s:

18. What is the coolest hack you've ever written?While there is no "correct" answer, a nice hack for solving the first problem in the SIAM hundred-dollar, hundred-digit challenge can be achieved by converting the limit into the strongly divergent series:and then using Mathematica's numerical function SequenceLimit to trivially get the correct answer (to six digits),You must tweak parameters a bit or write your own sequence limit to get all 10 digits.

19. 'Tis known in refined company, that choosing K things out of N can be done in ways as many as choosing N minus K from N: I pick K, you the remaining.

Page 32: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

This simply states the binomial coefficient identity .Find though a cooler bijection, where you show a knack uncanny, of making your choices contain all K of mine. Oh, for pedantry: let K be no more than half N.'Tis more problematic to disentangle semantic meaning precise from the this paragraph of verbiage peculiar.

20. What number comes next in the sequence: 10, 9, 60, 90, 70, 66, ?A) 96B) 1000000000000000000000000000000000\0000000000000000000000000000000000\000000000000000000000000000000000C) Either of the aboveD) None of the aboveThis can be looked up and found to be sequence A052196 in the On-Line Encyclopedia of Integer Sequences, which gives the largest positive integer whose English name has n letters. For example, the first few terms are ten, nine, sixty, ninety, seventy, sixty-six, ninety-six, …. A more correct sequence might be ten, nine, sixty, googol, seventy, sixty-six, ninety-six, googolplex. And also note, incidentally, that the correct spelling of the mathematical term " googol" differs from the name of the company that made up this aptitude test.The first few can be computed using the NumberName function in Eric Weisstein's MathWorld packages:A mathematical solution could also be found by fitting a Lagrange interpolating polynomial to the six known terms and extrapolating:

21. In 29 words or fewer, describe what you would strive to accomplish if you worked at Google Labs.

Google Interview Questions

 

First phone interview was specific questions on what you do at work.

Second phone interview was job situational

Given a dictionary segment, a piece of un-spaced text is used to find meaningful words from it. e.g "makemytrip"-> make my trip

Page 33: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

2nd Round :A design question (don't remember) and another question on adversarial mini-max search

3rd Round :Write a method to find the next ancestor of a node in a Binary Search Tree.Write a recursive function to convert Binary Code of a number into its equivalent Gray's code and the other way round.

4th round:Given two sorted arrays, find the kth minimum element of both.Given a set of intervals, find the interval which has the maximum number of intersections.

5th round:This one was focused on previous projects and experience and how good I was at what I had been doing.

Questions asked in different streams

 

1. Tell me about a situation when you had to multitask.

 

2. Why do you want to choose Google?

 

3. Describe a time when you had to tell a client that you couldn't meet a deadline

.

4. What was the best part you did on the role play?

 

5. What do you do in your spare time/when not working?

 

6. Given a list of integers that fall within a known short but unknown range of values, how to find the median value?

Page 34: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

 

7. Out of 10 coins, one weighs less than the others. You have a scale.

    How can you determine which one weighs less in 3 weighs?

    Now how would you do it if you didn't know if the odd coin weighs less or more?

8. Code an application that creates a new thread and exposes a "ping()" method. Whenever ping() is

 

9. called, the thread prints "Google rocks" once.

 

10. Write a method to pretty print a binary tree. Don't make any assumptions, i.e. the tree could be highly unbalanced.

 

11. Given a list of integers that fall within a known short but unknown range of values, how to find the median value?

 

12. Convert char string to integer.

 

13. Write a method to pretty print a binary tree. Don't make any assumptions, i.e. the tree could be highly unbalanced.

 

14. Find occurrences of a number in sorted array (allow duplicates).

 

15. If integer array used to store big integers (one integer store one digit), implement arithmetic operations

Page 35: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

 

16. In which field do you feel you have an edge?

 

17. To generate a fibonacci number sequence, and discuss its time and space complexity.

 

18. To merge two sorted integer arrays. 

Google hiring process

There is a lot of mystery and misinformation about the Google hiring process. The Google hiring process is designed to hire the most talented, creative, and articulate people in the world who will be the best fit for Google.Google receives over one million resumes per year, and hires more than thousands , depending on economic conditions

Google hiring process: The hiring process is pretty standard, it is the evaluation that is different. All open jobs are listed on Google.com. Browse for a job that fits you and submit your resume online. Every resume submitted online gets reviewed

Google Resume Screen:

In the first step of the process the recruiter screens every resume for technical requirements, education, and experience to make sure there is a potential fit. If there is no fit you will get a polite “no fit at this time” response, but your resume will be kept on file. The recruiter really does look at existing resumes on file when a new job req opens up. If there is a fit, a recruiter will contact you to set up a phone screen interview.

On line Test and Telephonic InterviewGoogle recruiter will contact you explain the process, and let you know what to expect. The phone screen is usually done by an employee in a similar role, and usually takes 30 minutes. There could be two or more phone screens, and you may even be asked to write code in a shared Google Doc during the phone screen if this is a technical role. The goal is to further assess your technical skills, past experience, and motivation for

Page 36: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

this new role .Google conducts one line  Your responsibility to check your mail regularly with out fail because nobody calls you

Interview : Google site interview The first on site interview will be with four or five people for 45 minutes each. This interview will go deeper into your technical skills or domain specific knowledge. If this is a technical role you will be asked to solve technical problems in real time, which may include coding a solution or white-boarding a design. This can get pretty intense for the unprepared candidate, or incredibly fun and stimulating if you are into it. Every interviewer submits their feedback in a standard format about the candidate and assigns a numerical ranking to the candidate. The feedback is reviewed by the recruiter and compared to feedback on other candidates for this job and similar roles. There is also a process to collect feedback from former colleagues. All existing employees resumes are in a database. Hiring Committee-The committee reviews every piece of feedback as well as the resume and work experience.

Some Interview Questions

Google Interview Questions: Product Marketing Manager

1) Why do you want to join Google?

2) What do you know about Google’s product and technology?

3) If you are Product Manager for Google’s Adwords, how do you plan to market this?

4) What would you say during an AdWords or AdSense product seminar?

5) Who are Google competitors, and how does Google compete with them?

6) Have you ever used Google’s products? Gmail?

7) What’s a creative way of marketing Google’s brand name and product?

8) If you are the product marketing manager for Google’s Gmail product, how do you plan to market it so as to achieve 100 million customers in 6 months?

Google Interview Questions: Product Manager

1) How would you boost the GMail subscription base?

2) What is the most efficient way to sort a million integers?

Page 37: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

3) How would you re-position Google’s offerings to counteract competitive threats from Microsoft?

4) How many golf balls can fit in a school bus?

5) You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seconds. What do you do?

6) How much should you charge to wash all the windows in Seattle?

7) How would you find out if a machine’s stack grows up or down in memory?

8) Explain a database in three sentences to your eight-year-old nephew.

9) How many times a day does a clock’s hands overlap?

Google sample placement papers site interview telephonic interview procedure

1) Given four matricesP = 20×10Q = 10×5R = 5×10S = 10×10Find minimum no. of multiplication required for PxQxRxS?a) 4000b) 2500c) 3000d) None Of These

2) Two n-size arays are given . n1 in decreasing order and n2 in increasing order. If c1 is time complexity for n1 using quicksort and c2 is time complexity for n2 using quicksort. Then –a) c1 > c2b) c1 < c2c) c1 = c2d) None of these

Page 38: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

3) If there is a N sorted array then what is time complexity of finding 2 no.s having sum less than 1000.a) O(1)b) O(n^2)c) O(n)d) O(logn)

4) There are some process . In which of the scheduling algo CPU utilization is minimum. If I/O burst time is 90ms and CPU burst time is 10ms.(question is very long to remember)

5)

int func(int x, int *y, int **z){int p, q;x += 2;p = *y++;q = **z++;q = **z++; //Not a repeated line.}void main(){int a = 5, *b, **c;b = &a;c = &b;printf(“%d”,a);}6) Find the least significant digit of 2^3*google where google=10^100.a) 2b) 4c) 6d) 8

7) Let w(n) and A(n) denote respectively, the worst case and average case running time of an algorithm executed on an input of size n. which of the following is ALWAYS TRUE?a) A(n) = Omega(W(n))b) A(n) = Theta(W(n))c) A(n) = O(W(n))d) A(n) = o(W(n))

8) Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry Wij in the matrix W below is the weight of the edge {i, j}.

0 1 8 1 4

Page 39: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

1 0 12 4 9W = 8 12 0 7 31 4 7 0 24 9 3 2 0What is the minimum possible weight of a spanning tree T in this graph such that vertex 0 is a leaf node in the tree T?a) 7b) 8c) 9d) 10

9) In the graph given in question 8, what is the minimum possible weight of a path P from vertex 1 to vertex 2 in this graph such that P contains at most 3 edges?a) 7b) 8c) 9d) 10

10) A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below.

|0| | |1| ||2| 42||3| 23||4| 34||5| 52||6| 46||7| 33||8| ||9| |Which one of the following choices gives a possible order in which the key values could have been inserted in the table?a) 46, 42, 34, 52, 23, 33b) 34, 42, 23, 52, 33, 46c) 46, 34, 42, 23, 52, 33d) 42, 46, 33, 23, 34, 52

11) How many different insertion sequences of the key values using the same hash function of question 10 and linear probing will result in the hash table shown above?a) 10b) 20c) 30

Page 40: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

d) 40

12) The recurrence relation capturing the optimal time of the Tower of Hanoi problem with n discs isa) T(n) = 2T(n – 2) + 2b) T(n) = 2T(n – 1) + nc) T(n) = 2T(n/2) + 1d) T(n) = 2T(n – 1) + 1

13) Given three semaphores, S0, S1 and S2 initialized as S0=1, S1=0, S2=0 and processes P0, P1 and P2.

P0 : while(true)P0, P1 and P2.P0 : while(true){wait(S0);printf(“ 0 “);Release(S1);Release(S2);}P1: while(true){Wait(S1);Release(S2);}P2: while(true){Wait(S2);Release(S0);} Find out how many times the process P0 executes printf statement.a) At least twiceb) Exactly oncec) Exactly twiced) Exactly thrice

14) Given the following program construct

{if ( a == b ) { S1; exit(); }else if ( c==d ) { S2; }else { S3; exit(); }S4;} Given 4 test cases, find out which one among the following covers all the 4

Page 41: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

statementsT1: a, b, c and d are same.T2: a, b, c and d are all distinct.T3: a == b and c != d.T4: a != b and c==d.a) T1, T2 & T3;b) T1, T4.c) T2, T4.d) T1, T2 & T4.

15) Which of the following statements are true?I. Shortest remaining time first scheduling may cause starvationII. Preemptive scheduling may cause starvationIII. Round robin is better than FCFS in terms of response timea) I onlyb) I and III onlyc) II and III onlyd) I, II and III

16) Sequences of logical pages access :1 2 3 2 4 1 3 2 4 1Implemented Optimal,LRU,FIFO Page replacement techniques.Then no. of page faults in :a) Optimal < LRU < FIFOb) Optimal < FIFO < LRUc) Optimal = FIFOd) None

17) Find the no. of page faults for Optimal Page replacement technique in the given sequence of question no. 16.a) 5b) 6c) 7d) 8

18) Given a simple graph of 6 nodes (note- it’s a simple graph) then tell which of the following is a set of valid graph degrees.a) 4,4,1,1,1,1b) 4,4,2,1,1,1c) 4,4,2,2,1,1d) None

19)

gcd(n,m){

Page 42: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

if (n%m == 0)return n;n = n%m;return gcd ( m, n);} What is the complexity of calculating gcd(n, m) in worst case?a) O(lgn)b) O(lgm)c) O(lg(lgn))d) O(lg(lgm))

20)

void f(char * x){x++;*x = 'a';}int main(){char * str = "hello";f(str);cout << str;system("pause");return 0;} a) hellob) halloc) allod) empty string

Google Placement Paper and Sample Paper

1. Solve this cryptic equation, realizing of course that values for M and E could be interchanged. No leading zeros are allowed.WWWDOT - GOOGLE = DOTCOMThis can be solved through systematic application of logic. For example, cannot be equal to 0, since . That would make , but , which is not possible.Here is a slow brute-force method of solution that takes a few minutes on a relatively fast machine:

This gives the two solutions777589 - 188106 == 589483777589 - 188103 == 589486

Page 43: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

Here is another solution using Mathematica's Reduce command:A faster (but slightly more obscure) piece of code is the following:Faster still using the same approach (and requiring ~300 MB of memory):Even faster using the same approach (that does not exclude leading zeros in the solution, but that can easily be weeded out at the end):Here is an independent solution method that uses branch-and-prune techniques:And the winner for overall fastest:

2. Write a haiku describing possible methods for predicting search traffic seasonality.MathWorld's search engineseemed slowed this May. Undergradsprepping for finals.3. 11 12 11 2 1 11 1 1 2 2 1What's the next line?

312211. This is the "look and say" sequence in which each term after the first describes the previous term: one 1 (11); two 1s (21); one 2 and one 1 (1211); one 1, one 2, and two 1's (111221); and so on. See the look and say sequence entry on MathWorld for a complete write-up and the algebraic form of a fascinating related quantity known as Conway's constant.

4. You are in a maze of twisty little passages, all alike. There is a dusty laptop here with a weak wireless connection. There are dull, lifeless gnomes strolling around. What dost thou do?A) Wander aimlessly, bumping into obstacles until you are eaten by a grue.B) Use the laptop as a digging device to tunnel to the next level.C) Play MPoRPG until the battery dies along with your hopes.D) Use the computer to map the nodes of the maze and discover an exit path.E) Email your resume to Google, tell the lead gnome you quit and find yourself in whole different world [sic].In general, make a state diagram . However, this method would not work in certain pathological cases such as, say, a fractal maze. For an example of this and commentary, see Ed Pegg's column about state diagrams and mazes .

5. What's broken with Unix?Their reproductive capabilities.How would you fix it?

Page 44: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

6. On your first day at Google, you discover that your cubicle mate wrote the textbook you used as a primary resource in your first year of graduate school. Do you:A) Fawn obsequiously and ask if you can have an autograph.B) Sit perfectly still and use only soft keystrokes to avoid disturbing her concentrationC) Leave her daily offerings of granola and English toffee from the food bins.D) Quote your favorite formula from the textbook and explain how it's now your mantra.E) Show her how example 17b could have been solved with 34 fewer lines of code.

7. Which of the following expresses Google's over-arching philosophy?A) "I'm feeling lucky"B) "Don't be evil"C) "Oh, I already fixed that"D) "You should never be more than 50 feet from food"E) All of the above

8. How many different ways can you color an icosahedron with one of three colors on each face?For an asymmetric 20-sided solid, there are possible 3-colorings . For a symmetric 20-sided object, the Polya enumeration theorem can be used to obtain the number of distinct colorings. Here is a concise Mathematica implementation:What colors would you choose?

9. This space left intentionally blank. Please fill it with something that improves upon emptiness.For nearly 10,000 images of mathematical functions, see The Wolfram Functions Site visualization gallery .

10. On an infinite, two-dimensional, rectangular lattice of 1-ohm resistors, what is the resistance between two nodes that are a knight's move away?This problem is discussed in J. Cserti's 1999 arXiv preprint . It is also discussed in The Mathematica GuideBook for Symbolics, the forthcoming fourth volume in Michael Trott's GuideBook series, the first two of which were published just last week by Springer-Verlag. The contents for all four GuideBooks, including the two not yet published, are available on the DVD distributed with the first two GuideBooks.

Page 45: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

11. It's 2PM on a sunny Sunday afternoon in the Bay Area. You're minutes from the Pacific Ocean, redwood forest hiking trails and world class cultural attractions. What do you do?

12. In your opinion, what is the most beautiful math equation ever derived?There are obviously many candidates. The following list gives ten of the authors' favorites:1. Archimedes' recurrence formula : , , ,

2. Euler formula 

3. Euler-Mascheroni constant :

4. Riemann hypothesis: and implies

5. Gaussian integral :

6. Ramanujan's prime product formula:

7. Zeta-regularized product :

8. Mandelbrot set recursion:

9. BBP formula :

10. Cauchy integral formula:An excellent paper discussing the most beautiful equations in physics is Daniel Z. Freedman's " Some beautiful equations of mathematical physics ." Note that the physics view on beauty in equations is less uniform than the mathematical one. To quote the not-necessarily-standard view of theoretical physicist P.A.M. Dirac, "It is more important to have beauty in one's equations than to have them fit experiment."

13. Which of the following is NOT an actual interest group formed by Google employees?A. Women's basketballB. Buffy fansC. CricketeersD. Nobel winnersE. Wine club

14. What will be the next great improvement in search technology?Semantic searching of mathematical formulas. .html for work currently underway at Wolfram Research that will be made available in the near future.15. What is the optimal size of a project team, above which additional

Page 46: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

members do not contribute productivity equivalent to the percentage increase in the staff size?A) 1B) 3C) 5D) 11E) 24

16. Given a triangle ABC, how would you use only a compass and straight edge to find a point P such that triangles ABP, ACP and BCP have equal perimeters? (Assume that ABC is constructed so that a solution does exist.)This is the isoperimetric point , which is at the center of the larger Soddy circle. It is related to Apollonius' problem . The three tangent circles are easy to construct: The circle around has diameter , which gives the other two circles. A summary of compass and straightedge constructions for the outer Soddy circle can be found in " Apollonius' Problem: A Study of Solutions and Their Connections" by David Gisch and Jason M. Ribando.

17. Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n. For example, f(13)=6. Notice that f(1)=1. What is the next largest n such that f(n)=n?The following Mathematica code computes the difference between [the cumulative number of 1s in the positive integers up to n] and [the value of n itself] as n ranges from 1 to 500,000:The solution to the problem is then the first position greater than the first at which data equals 0:which are the first few terms of sequence A014778 in the On-Line Encyclopedia of Integer Sequences.Checking by hand confirms that the numbers from 1 to 199981 contain a total of 199981 1s:

18. What is the coolest hack you've ever written?While there is no "correct" answer, a nice hack for solving the first problem in the SIAM hundred-dollar, hundred-digit challenge can be achieved by converting the limit into the strongly divergent series:and then using Mathematica's numerical function SequenceLimit to trivially get the correct answer (to six digits),You must tweak parameters a bit or write your own sequence limit to get all 10 digits.

19. 'Tis known in refined company, that choosing K things out of N can be done in ways as many as choosing N minus K from N: I pick K, you the remaining.This simply states the binomial coefficient identity .

Page 47: technicalsymposium.com€¦  · Web view3) If you are Product Manager for Google’s Adwords, how do you plan to market this? 4) What would you say during an AdWords or AdSense product

Find though a cooler bijection, where you show a knack uncanny, of making your choices contain all K of mine. Oh, for pedantry: let K be no more than half N.'Tis more problematic to disentangle semantic meaning precise from the this paragraph of verbiage peculiar.

20. What number comes next in the sequence: 10, 9, 60, 90, 70, 66, ?A) 96B) 1000000000000000000000000000000000\0000000000000000000000000000000000\000000000000000000000000000000000C) Either of the aboveD) None of the aboveThis can be looked up and found to be sequence A052196 in the On-Line Encyclopedia of Integer Sequences, which gives the largest positive integer whose English name has n letters. For example, the first few terms are ten, nine, sixty, ninety, seventy, sixty-six, ninety-six, …. A more correct sequence might be ten, nine, sixty, googol, seventy, sixty-six, ninety-six, googolplex. And also note, incidentally, that the correct spelling of the mathematical term " googol" differs from the name of the company that made up this aptitude test.The first few can be computed using the NumberName function in Eric Weisstein's MathWorld packages:A mathematical solution could also be found by fitting a Lagrange interpolating polynomial to the six known terms and extrapolating:

21. In 29 words or fewer, describe what you would strive to accomplish if you worked at Google Labs.