Upload Button Icon Add office photos

Google

Compare button icon Compare button icon Compare

Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards

zig zag pattern zig zag pattern

Filter interviews by

Google Python Developer Interview Questions and Answers

Updated 10 Sep 2022

Google Python Developer Interview Experiences

1 interview found

I applied via Job Fair and was interviewed in Mar 2022. There were 3 interview rounds.

Round 1 - Coding Test 

Python programming language

Round 2 - Technical 

(3 Questions)

  • Q1. 1. What is Python? 2. What Are Python Advantages? 3. Why do you we use in python Function? 4. What is the break Statement? 5. What is tuple in python?
  • Ans. 

    Python is a high-level, interpreted programming language known for its simplicity, readability, and versatility.

    • Python is used for web development, data analysis, artificial intelligence, and more.

    • Advantages of Python include its ease of use, large standard library, and community support.

    • Functions in Python are used to group related code and make it reusable.

    • The break statement is used to exit a loop prematurely.

    • A tupl...

  • Answered by AI
  • Q2. 6.What are local variables and global variables in Python? 7.When to use a tuple vs list vs dictionary in Python? 8.Explain some benefits of Python 9.What is Lambda Functions in Python? 10.What is a Negati...
  • Ans. 

    Local variables are variables that are defined within a function and can only be accessed within that function. Global variables are variables that are defined outside of any function and can be accessed throughout the program.

    • Local variables are created when a function is called and destroyed when the function completes.

    • Global variables can be accessed and modified by any function in the program.

    • Using local variables ...

  • Answered by AI
  • Q3. 11.What is the namespace in Python? 12.What is a dictionary in Python? 13.What is type conversion in Python? 14.What is the difference between Python Arrays and lists? 15.What are functions in Python?
  • Ans. 

    Answers to common Python interview questions.

    • Namespace is a container for storing variables and functions.

    • Dictionary is a collection of key-value pairs.

    • Type conversion is the process of converting one data type to another.

    • Arrays are homogeneous while lists are heterogeneous.

    • Functions are blocks of code that perform a specific task.

  • Answered by AI
Round 3 - HR 

(2 Questions)

  • Q1. 1. Tell me About yourself? 2. Why role this Attract you? 3. What is more important to you: the money or the work? 4. Why did you leave your last job? 5.What are Achivement in life?
  • Q2. 6.What are your weaknesses? 7.What are your hobbies? 8.Would you lie for the company? 9.What does success mean to you? 10.Do you have any blind spot?

Interview Preparation Tips

Interview preparation tips for other job seekers - Yes i am company work for this Google company to is my work in Google company best work for this company and python Project work for company in Google only for this work this Google company.

Skills evaluated in this interview

Interview questions from similar companies

I appeared for an interview in Aug 2017.

Interview Questionnaire 

7 Questions

  • Q1. Implement Merge Sort.
  • Ans. 

    Merge Sort is a divide and conquer algorithm that sorts an array by dividing it into two halves, sorting them separately, and then merging the sorted halves.

    • Divide the array into two halves

    • Recursively sort the two halves

    • Merge the sorted halves

  • Answered by AI
  • Q2. Given a BST containing distinct integers, and a number ‘X’, find all pairs of integers in the BST whose sum is equal to ‘X’.
  • Ans. 

    Find pairs of integers in a BST whose sum is equal to a given number.

    • Traverse the BST and store the values in a hash set.

    • For each node, check if (X - node.value) exists in the hash set.

    • If yes, add the pair (node.value, X - node.value) to the result.

    • Continue traversal until all nodes are processed.

  • Answered by AI
  • Q3. Given a set of time intervals in any order, merge all overlapping intervals into one and output the result which should have only mutually exclusive intervals.
  • Ans. 

    Merge overlapping time intervals into mutually exclusive intervals.

    • Sort the intervals based on their start time.

    • Iterate through the intervals and merge overlapping intervals.

    • Output the mutually exclusive intervals.

    • Example: [(1,3), (2,6), (8,10), (15,18)] -> [(1,6), (8,10), (15,18)]

  • Answered by AI
  • Q4. What are the different types of hashing? Suggest an alternative and a better way for Linear Chaining.
  • Ans. 

    Different types of hashing and alternative for Linear Chaining

    • Different types of hashing include division, multiplication, and universal hashing

    • Alternative for Linear Chaining is Open Addressing

    • Open Addressing includes Linear Probing, Quadratic Probing, and Double Hashing

  • Answered by AI
  • Q5. Implement AVL Tree.
  • Ans. 

    An AVL tree is a self-balancing binary search tree where the heights of the left and right subtrees differ by at most one.

    • AVL tree is a binary search tree with additional balance factor for each node.

    • The balance factor is the difference between the heights of the left and right subtrees.

    • Insertion and deletion operations in AVL tree maintain the balance factor to ensure the tree remains balanced.

    • Rotations are performed ...

  • Answered by AI
  • Q6. Minimum number of squares whose sum equals to given number n.
  • Ans. 

    Find the minimum number of squares whose sum equals to a given number n.

    • Use dynamic programming to solve the problem efficiently.

    • Start with finding the square root of n and check if it is a perfect square.

    • If not, then try to find the minimum number of squares required for the remaining number.

    • Repeat the process until the remaining number becomes 0.

    • Return the minimum number of squares required for the given number n.

  • Answered by AI
  • Q7. Insertion sort for a singly linked list.
  • Ans. 

    Insertion sort for a singly linked list.

    • Traverse the list and compare each node with the previous nodes

    • If the current node is smaller, swap it with the previous node

    • Repeat until the end of the list is reached

    • Time complexity is O(n^2)

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: There were 2 coding questions (no penalty for wrong submission) and 20 Multiple Choice Questions(with negative marking). We were given 90 minutes to solve them. MCQs were based on Data Structures, OS, CN, C outputs, OOP etc.
Tips: Experience in Competitive Programming might help in solving coding questions. No constraints were mentioned and detailed Instructions related to problem were stated vaguely. So code carefully.
Duration: 1 hour 30 minutes
Total Questions: 22

Round: Technical Interview
Experience: The interviewer asked me to introduce myself and a brief introduction of the projects that I have done. She first asked me questions related to my project. After that she moved on to the data structures part.
Tips: Take your time to approach the problems and if the question is not clear ask the interviewer to explain it again.

Round: Technical Interview
Experience: The interviewer asked me about how my previous round went. After that, he asked me to introduce myself and a brief introduction of the projects that I have done. He first asked me a few questions related to my project. Then he moved on to the data structures part. In this round the interviewer gave me strict time limit for coding the solution on paper for each problem and as soon as I was done coding he gave me 2-3 minutes every time to find errors and debug my code.
Tips: Do not panic even if the interviewer sets time limit while solving problems. If the question is not clear ask the interviewer to explain it again.

College Name: The LNM Institute Of Information Technology, Jaipur

Skills evaluated in this interview

Interview Questionnaire 

16 Questions

  • Q1. Simple linked list questions-find middle element,given a pointer to second last element delete it
  • Q2. Explain insertion sort,quicksort
  • Ans. 

    Insertion sort and quicksort are sorting algorithms used to sort arrays of data.

    • Insertion sort: iterates through the array and inserts each element into its proper position.

    • Quicksort: selects a pivot element and partitions the array into two sub-arrays, one with elements less than the pivot and one with elements greater than the pivot.

    • Insertion sort is best for small arrays, while quicksort is best for large arrays.

    • Bot...

  • Answered by AI
  • Q3. Concept of virtual destructors,runtime polymorphism
  • Q4. Test cases for an installation software like check if sufficient memory available,check for a previous version,check to undo all the changes made to the system while quitting the installation. 5.2 puzzles
  • Q5. Merge two sorted linked lists using recursion
  • Ans. 

    Merge two sorted linked lists using recursion

    • Create a recursive function that compares the first nodes of both lists

    • Set the smaller node as the head of the merged list and call the function again with the next node of the smaller list

    • Base case: if one list is empty, return the other list

    • Return the merged list

  • Answered by AI
  • Q6. Given an integer(consider 4 bytes) find which byte is zero
  • Ans. 

    Given an integer, determine which byte is zero.

    • Convert the integer to a byte array using bitwise operations.

    • Iterate through the byte array and check for a zero value.

    • Return the index of the zero byte.

    • Consider endianness when converting to byte array.

  • Answered by AI
  • Q7. Program to check whether your machine is little endian or big endian
  • Ans. 

    To check endianness, create a 4-byte integer with a known value and check the byte order.

    • Create a 4-byte integer with a known value

    • Check the value of the first byte to determine endianness

    • If the first byte is the least significant, the machine is little endian

    • If the first byte is the most significant, the machine is big endian

  • Answered by AI
  • Q8. Print something before execution of main()(use static objects)
  • Ans. 

    Static objects can be used to print something before main() execution.

    • Static objects are initialized before main() execution

    • They can be used to print something before main()

    • Example: static int x = printf("Hello World!");

    • Output: Hello World! will be printed before main() execution

  • Answered by AI
  • Q9. Memory allocation for static varibles(when,which segment etc)
  • Ans. 

    Static variables are allocated memory in the data segment of the program's memory space.

    • Static variables have a fixed memory location throughout the program's execution.

    • They are initialized to zero by default.

    • If initialized explicitly, they are stored in the data segment.

    • Static variables can be accessed by any function in the program.

  • Answered by AI
  • Q10. Find space and time complexity for a recursive function(he wrote it)
  • Ans. 

    Finding space and time complexity of a recursive function.

    • Space complexity is the amount of memory used by the function.

    • Time complexity is the amount of time taken by the function to execute.

    • Recursive functions have higher space complexity due to the call stack.

    • Time complexity can be calculated using Big O notation.

    • Examples of recursive functions include factorial and Fibonacci sequence.

  • Answered by AI
  • Q11. Some questions on major project
  • Q12. Preprocessor directives,volatile keyword
  • Q13. Virtual pointer table,operator overloading,friend functions,semaphores
  • Q14. Diamond heirarchy problem
  • Ans. 

    Diamond hierarchy problem is a problem in object-oriented programming where a class inherits from multiple classes in a diamond-shaped hierarchy.

    • Occurs when a class inherits from two classes that share a common base class

    • Can lead to ambiguity in method calls and data members

    • Solved using virtual inheritance or by using interfaces

  • Answered by AI
  • Q15. Fibonacci series.(:P)
  • Q16. Puzzle

Interview Preparation Tips

Round: Test
Experience: 1. Aptitude-Mostly caselets on ordering and some easy quant questions.
2. c/c++-No objective questions.Mostly on basics(function pointers,give output of string based codes).Some simple progams(Find smallest of three numbers using conditional operators.gcd using recursion)
3.Data Structures-LCA for BST,2's compliment,reverse a doubly linked list.

College Name: NA

Skills evaluated in this interview

Interview Questionnaire 

20 Questions

  • Q1. He asked me my specialization?
  • Q2. Why not further studies? (He had noted that I was third in my batch. He appeared impressed by that
  • Q3. He asked me to tell him about my favorite project
  • Q4. He then looked at my grades. He commented that my lowest grade – B- was in Digital Image Processing. I just looked at him like a doofus thinking of what to say. But he quickly added, ‘don’t worry, it happe...
  • Q5. He then asked me a question that had been asked in Round 4, written test:Describe an optimal algorithm to find the second minimum number in an array of numbers. What is the exact number of comparisons requ...
  • Q6. Given a polygon (could be regular, irregular, convex, concave), find out whether a particular point lies inside it or outside it
  • Ans. 

    To determine if a point is inside a polygon, use the ray casting algorithm.

    • Create a line from the point to a point outside the polygon

    • Count the number of times the line intersects with the polygon edges

    • If the count is odd, the point is inside the polygon; otherwise, it is outside

  • Answered by AI
  • Q7. He asked me to explain Canny’s algorithm to him. (this was because my DIP project was related to this)
  • Q8. Then, he gave me a practical problem to solve: Suppose you are given an image which contains some text and some photos. How do you find the location of the image?
  • Q9. Which are the four storage classes in C
  • Ans. 

    The four storage classes in C are auto, register, static, and extern.

    • Auto: default storage class for all local variables

    • Register: used to define local variables that should be stored in a register instead of RAM

    • Static: used to define local variables that retain their value between function calls

    • Extern: used to declare a global variable that is defined in another file

  • Answered by AI
  • Q10. Given a program: int i; int main() { int j; int *k = (int *) malloc (sizeof(int)); … } Where are each of these variables stored?
  • Ans. 

    i is stored in global data segment, j is stored in stack, k is stored in heap.

    • i is a global variable and is stored in the global data segment

    • j is a local variable and is stored in the stack

    • k is a pointer variable and is stored in the stack, while the memory it points to is allocated on the heap using malloc()

  • Answered by AI
  • Q11. Question on polymorphisms
  • Q12. He again went back to the first question he had asked me. Once again
  • Q13. Then he wrote out some code and asked me how the compiler will generate code for it. I gave some answer, but he was clearly not satisfied. I thought it was all over by then. Then, he asked me a DIP quest...
  • Q14. Given a set of words one after another, give me a data structure so that you’ll know whether a word has appeared already or not
  • Ans. 

    Use a hash table to store the words and check for existence in constant time.

    • Create a hash table with the words as keys and a boolean value as the value.

    • For each new word, check if it exists in the hash table. If it does, it has appeared before. If not, add it to the hash table.

    • Alternatively, use a set data structure to store only the unique words and check for existence in the set.

  • Answered by AI
  • Q15. He asked me some questions on Interprocess Communication: What’s a semaphore? How are they used? He would often pick out words from my answers and ask me what they meant. He wanted to make sure that I rea...
  • Q16. He then asked me some DB fundas. Transaction. Serializability, Consistent state, etc
  • Q17. Finally, he asked me whether I had any questions
  • Q18. There is a clock at the bottom of the hill and a clock at the top of the hill. The clock at the bottom of the hill works fine but the clock at the top doesn’t. How will you synchronize the two clocks. Obv...
  • Q19. There was one more puzzle.. I don’t remember it. but I do remember that we started discussing ways of generating large prime numbers
  • Q20. We also talked a bit about my phone browser project

Interview Preparation Tips

Round: Test
Duration: 15 minutes
Total Questions: 1

Round: Test
Duration: 30 minutes
Total Questions: 2

Round: Test
Duration: 30 minutes
Total Questions: 3

Round: Test
Total Questions: 4

Round: Technical Interview
Experience: 1.When I told him that I had none as I didn’t want to specialize in this stage, he was a little surprised but appeared satisfied with my reason.2.I told him that my profile clearly indicated that I’ve been trying to get into the industry via internships, industry-funded projects right from second year, second sem. I said that I was fully sure that I didn’t want to do MS anytime soon.3.I told him about the web-browser that I had developed for cell-phones. I thought that was the only project which was closest to what Adobe was working on. He appeared satisfied with my answers.4. So people, be fully prepared to explain any anomalous grades. I was prepared with the explanation of the W in the my grade-sheet but not of the B- in DIP. I know that this is really stupid considering that I was interviewing with Adobe. Don’t make this mistake.5.I screwed up, big time in this question. I had superficially discussed this question with my friend a while ago and he had outlined an algorithm which I thought that I had understood, but I hadn’t. I started off explaining it but got stuck in the middle. He sternly told me to read it up again. One solution that I could tell him, and which I had written in the test was this Use two variables – min and second min. Initialize them by comparing the first two elements of the array. This is (1) comparison. Then, go through the entire array, from index 2 to n-1 comparing each element, first with min and then with second min, updating each variable as necessary. This will involve a worst case of two comparisons for each element. Therefore, total number of comparisons = 2*(n-2) + 1 = 2*n – 3 comparisons.I’ll try to update this with a better solution, sometime soon.6.This is an easy, straight question from graphics. You shoot a ray parallel to the x-axis passing through this point. Start with odd parity. Change parity of ray each time it intersects an edge of the polygon (consider special case of when the line passes through a vertex of the polygon. Change parity only if it passes through a vertex which has one edge above it and one edge below the ray). If the parity of ray is even when it passes through the point, it is inside the polygon, else it is not.7.This is simple. Study DIP8.I gave various alternatives – from searching for RGB components, to using OCR.. he didn’t appear fully satisfied. I think he was looking for edge-detection, but that would fail, if the text contained tables, etc.

Round: Technical Interview
Experience: He was friendly at the start but this interview was my worst. He asked me my favorite subject. I said that it was Programming. (He laughed at that)

1. static, extern, register, auto2.I started off correctly, but he was able to confuse me. He brought in shared libraries, static libraries fundas into the discussion. We had a discussion for about twenty-minutes on this. Finally, he was happy with one of my answers because I had deduced which policy made sense and answered correctly. He said that out of all the people interviewed so far (I was second last), nobody had been able to answer all of these questions correctly.3.this is easy – get it from any C++ book. He tried to confuse me again, but this time I was ready and he was finally satisfied.Then he looked at my grades and said that out of all your grades, you have only two Bs and one of them is in Compilers. Why? (Damn it. three non-A grades and that’s all they ask about. What’s wrong with this world?!)Didn’t you like Compilers? “Not in particular”, I replied. “Fine. Now, I HAVE to ask you questions on compilers”, he said.4.He again went back to the first question he had asked me. Once again5.I first suggested that we capture only a small portion of the board. To locate that portion, we could search for the chalk in the prof’s hand – of course, taking care that it had the blackboard in the background (no point capturing a video of the prof scratching his chin, na?). Further, if the prof was writing only text, we could convert the video into text by OCR and then transmitting. Simple diagrams could also be reduced to a set of vector-graphics instructions (we rarely, see the prof shading stuff). I think he liked my approach, but was not completely satisfied. Anyway, we left it at that and went forward.6.I suggested various alternatives. but he kept helping me and finally, we came up with an array of pointers to 26-trees (each node of the tree has 26 children). Store every word as a path from the root to a leaf with pointers in the correct places. For example, hello would be stored as – pointer from ‘h’ index of the root array to a node which had a pointer from ‘e’ index of it’s array to a node which had a pointer from ‘l’ index of the array.. and so on. This is both time and space efficient.7.I was able to answer all his questions, but I made the mistake of telling him, when we started off that I didn’t know much about this subject as I had done it a long time ago. He was very annoyed at that, apparently because a lot of people before me had said this.8.I was able to answer all of them. I stumbled around a bit in a few questions where I was explaining correctly, but not using the keywords that he was looking for.9.I thought that I should say something to make him realize that I was not completely stupid and so asked him whether there was any logic to the order in which the short-listed candidates were called. This turned out to be a dumb move. The order was alphabetic and he sent me off with a parting shot, saying “You guys do pattern recognition and stuff and still you can’t recognize such a simple pattern” Me and my big mouth! Moral of the story: Don’t ask questions for the sake of asking.

Round: Puzzle Interview
Experience: After the first two interviews, this one was like having a warm batch after being cold and wet for days! I did well in this one.1.You have to go up the hill and come back, with horse, without horse, getting four equations to solve four unknowns – time to go uphill – with horse, without horse, time to go downhill – with horse, without horse. Then you can go up the hill and set the clock to ‘(time when you left) + (time to go uphill with horse)’2.  I told him the funda of Mersenee primes (luckily remembered it) and he was decently impressed.

General Tips: Finally hired by Adobe. Special thanks to AmbitionBox team. Really amazing site for sharing experience. That’s all for the Adobe. They are focusing on your approach and your coding skills. All the best.
Skills: Algorithm, Data structure, C++, C, DIP
College Name: BIT Mesra

Skills evaluated in this interview

Interview Questionnaire 

12 Questions

  • Q1. Given a binary tree and an integer x, return whether the binary tree has a path from root to a leaf whose values sum to x
  • Q2. Gievn a binary tree and return all root to leaf node pathss row,col and value
  • Ans. 

    Return all root to leaf node paths in a binary tree with row, col and value.

    • Traverse the binary tree recursively and keep track of the current path.

    • When a leaf node is reached, add the path to the result array.

    • Include row, col and value of each node in the path.

    • Use an array of strings to store the paths.

  • Answered by AI
  • Q3. He then asked me to give test cases for testing this program
  • Q4. Given two unsorted arrays of numbers and asked me to find the intersection
  • Q5. GetMax() function for a stack in O(1)
  • Ans. 

    To get max value from a stack in O(1), maintain a separate stack to keep track of maximum values.

    • Create a separate stack to keep track of maximum values

    • Push the maximum value onto the stack whenever a new maximum is encountered

    • Pop the maximum value stack whenever the top element of the main stack is popped

    • Return the top element of the maximum value stack to get the maximum value in O(1)

  • Answered by AI
  • Q6. GetMax() function for a queue in O(1)
  • Ans. 

    To get max element from a queue in O(1) time complexity

    • Maintain a separate variable to keep track of the maximum element in the queue

    • Update the maximum element variable whenever a new element is added or removed from the queue

    • Return the maximum element variable when getMax() function is called

  • Answered by AI
  • Q7. Given an array in which consecutive elements differ by 1, i.e. a[i] – a[i + 1] = 1 or -1, and an element x, find the element in the array
  • Q8. Given an array, find the Next Greatest Element to the right for each element
  • Ans. 

    Find the Next Greatest Element to the right for each element in an array of strings.

    • Iterate through the array from right to left

    • Use a stack to keep track of elements

    • Pop elements from stack until a greater element is found

    • If no greater element is found, assign -1

    • Return the result array

  • Answered by AI
  • Q9. Given an expression, remove unnecessary parenthesis. For example if (((a + b)) * c) is given make it (a + b) * c, as it evaluates in the same way without those parenthesis also
  • Ans. 

    To remove unnecessary parenthesis from an expression, we need to apply a set of rules to identify and eliminate them.

    • Identify and remove parenthesis around single variables or constants

    • Identify and remove parenthesis around expressions with only one operator

    • Identify and remove parenthesis around expressions with operators of equal precedence

    • Identify and remove parenthesis around expressions with operators of different ...

  • Answered by AI
  • Q10. Given an array of integers, find the maximum product which can be formed by three numbers
  • Ans. 

    Find the maximum product of three integers in an array.

    • Sort the array in descending order.

    • Check the product of the first three numbers and the product of the first and last two numbers.

    • Return the maximum of the two products.

  • Answered by AI
  • Q11. Given an array of integers, find the length of the longest consecutive sub array which forms an AP
  • Ans. 

    Find length of longest consecutive sub array forming an AP from given array of integers.

    • Sort the array in ascending order

    • Iterate through the array and find the longest consecutive sub array forming an AP

    • Use a variable to keep track of the length of the current consecutive sub array forming an AP

    • Use another variable to keep track of the length of the longest consecutive sub array forming an AP seen so far

  • Answered by AI
  • Q12. Given a binary tree, connect all the nodes at the same level. Each node will have a next pointer; you have to make it point to the next node to its right in the same level. If there is no such node, make ...

Interview Preparation Tips

Skills: Algorithm, Data structure
College Name: NA

Skills evaluated in this interview

I appeared for an interview before Jan 2021.

Round 1 - Face to Face 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

The interviewer asked me 2 questions related to DS/Algo in this round . Both the questions were of Easy-Medium difficulty and I was also required to code them in a production ready manner.

  • Q1. 

    Maximum Sum Path in a Binary Tree Problem Statement

    You are provided with a binary tree consisting of N nodes where each node has an integer value. The task is to determine the maximum sum achievable by a...

  • Ans. 

    Find the maximum sum achievable by a simple path between any two nodes in a binary tree.

    • Traverse the binary tree to find all possible paths and calculate their sums.

    • Keep track of the maximum sum encountered during traversal.

    • Consider paths that may include the same node twice.

    • Implement a recursive function to explore all possible paths.

    • Handle cases where nodes have negative values.

  • Answered by AI
  • Q2. 

    Intersection of Two Arrays Problem Statement

    Given two arrays A and B with sizes N and M respectively, both sorted in non-decreasing order, determine their intersection.

    The intersection of two arrays in...

  • Ans. 

    The problem involves finding the intersection of two sorted arrays efficiently.

    • Use two pointers to iterate through both arrays simultaneously.

    • Compare elements at the pointers and move the pointers accordingly.

    • Handle cases where elements are equal, and update the intersection array.

    • Return the intersection array as the result.

  • Answered by AI
Round 2 - Face to Face 

(3 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This round had 2 questions of DS/Algo to solve under 50 minutes and one question related to Operating Systems.

  • Q1. 

    Next Greater Element Problem Statement

    You are provided with an array or list ARR containing N positive integers. Your task is to determine the Next Greater Element (NGE) for each element in the array.

    T...

  • Ans. 

    Find the Next Greater Element for each element in an array.

    • Iterate through the array from right to left

    • Use a stack to keep track of elements with no greater element to the right

    • Pop elements from the stack until finding a greater element or stack is empty

  • Answered by AI
  • Q2. 

    Number In Arithmetic Progression Problem

    Given three integers X, C, and Y, where X is the first term of an arithmetic sequence with a common difference of C, determine if Y is part of this arithmetic sequ...

  • Ans. 

    Check if a given number is part of an arithmetic sequence with a given first term and common difference.

    • Calculate the arithmetic sequence using the formula: nth term = X + (n-1) * C

    • Check if Y is equal to any term in the sequence to determine if it belongs to the sequence

    • Return 'True' if Y belongs to the sequence, otherwise return 'False'

  • Answered by AI
  • Q3. Can you define process and threads in operating systems?
  • Ans. 

    Processes are instances of programs in execution, while threads are smaller units within a process that can execute independently.

    • A process is a program in execution, consisting of code, data, and resources.

    • Threads are smaller units within a process that can execute independently.

    • Processes have their own memory space, while threads share the same memory space within a process.

    • Processes are heavyweight, while threads ar...

  • Answered by AI
Round 3 - Face to Face 

(3 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This round had 2 questions of DSA of Easy-Medium difficulty and at the end I was asked a Puzzle to check my general problem solving ability.

  • Q1. 

    Max Product Subset Problem Statement

    Given an array/list arr of size n, determine the maximum product possible by taking any subset of the array/list arr. Return the result modulo 10^9+7 since the product ...

  • Ans. 

    Find the maximum product of a subset of an array modulo 10^9+7.

    • Iterate through the array and keep track of the maximum positive product and minimum negative product encountered so far.

    • Handle cases where the array contains zeros separately.

    • Return the maximum product modulo 10^9+7.

  • Answered by AI
  • Q2. 

    Populating Next Right Pointers in Each Node

    Given a complete binary tree with 'N' nodes, your task is to determine the 'next' node immediately to the right in level order for each node in the given tree.

    ...
  • Ans. 

    Implement a function to update 'next' pointers in a complete binary tree.

    • Iterate level by level using a queue

    • Connect nodes at each level using 'next' pointers

    • Handle null nodes appropriately

    • Ensure the tree is a complete binary tree

  • Answered by AI
  • Q3. You have two wires of different lengths that are both capable of burning for exactly one hour when ignited at both ends. How can you measure a time interval of 45 minutes using these two wires?
Round 4 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This round consisted of 2 questions from DSA where I was first asked to explain my approach to the interviewer with proper complexity analysis and then code the problems. The interviewer was quite friendly and also provided me some hints when I was stuck.

  • Q1. 

    Stack with getMin Operation

    Create a stack data structure that supports not only the usual push and pop operations but also getMin(), which retrieves the minimum element, all in O(1) time complexity witho...

  • Ans. 

    Implement a stack with push, pop, top, isEmpty, and getMin operations in O(1) time complexity without using extra space.

    • Use two stacks - one to store the actual elements and another to store the minimum element at each level.

    • When pushing an element, check if it is smaller than the current minimum and update the minimum stack accordingly.

    • When popping an element, also pop from the minimum stack if the popped element is t...

  • Answered by AI
  • Q2. 

    Split Array Into Maximum Subarrays Problem Statement

    You are given an integer array arr of size N. Your task is to split the array into the maximum number of subarrays such that the first and last occurre...

  • Ans. 

    Given an array, split it into maximum subarrays with first and last occurrence of each element in a single subarray.

    • Iterate through the array and keep track of the first and last occurrence of each element.

    • Use a hashmap to store the indices of each element.

    • Split the array whenever the last occurrence of an element is found.

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAAdobe interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 4 MonthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

I appeared for an interview before May 2021.

Round 1 - Coding Test 

Round duration - 90 minutes
Round difficulty - Medium

 Around 65-70 people sat for the test. 15 people were shortlisted. It consisted of the following to be done in 90 minutes.

- 28 MCQs based on core CS 

- 2 Coding questions – everyone had different and random questions. Most questions were custom logic based (easy level) including some standard questions – LCS, LIS, topological sort.

Round 2 - Face to Face 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Easy

Interviewer was very friendly. It started with the standard – tell me about yourself / introduce yourself type of question. Then he proceeded and asked two coding questions

  • Q1. 

    Remove Duplicates from a Sorted Linked List

    Your friend has homework to complete. Help him by removing duplicates from a sorted linked list.

    You are given the 'Head' of a sorted linked list. Modify the l...

  • Ans. 

    Remove duplicates from a sorted linked list without adjacent duplicates.

    • Traverse the linked list while comparing current and next nodes.

    • If they are equal, skip the next node by updating the current node's next pointer.

    • Repeat until the end of the list is reached.

  • Answered by AI
  • Q2. 

    Course Schedule Problem Statement

    You are enrolled as a student and must complete N courses, numbered from 1 to N, to earn your degree.

    Some courses have prerequisites, which means that to take course i,...

  • Ans. 

    Check if it is feasible to complete all courses with prerequisites.

    • Create a graph representing the prerequisites with courses as nodes and edges as prerequisites.

    • Perform a topological sort on the graph to check if there is a cycle (if there is, then it's not feasible to complete all courses).

    • If there is no cycle, then it is feasible to complete all courses.

  • Answered by AI
Round 3 - Face to Face 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

This round had only 1 question. The interviewer introduced himself. And he advised me to clearly understand the problem before proceeding.

  • Q1. 

    LCA of Binary Tree Problem Statement

    You are given a binary tree of distinct integers, along with two nodes, ‘X’ and ‘Y’. Your task is to determine the Lowest Common Ancestor (LCA) of ‘X’ and ‘Y’.

    The LC...

  • Ans. 

    Find the Lowest Common Ancestor of two nodes in a binary tree.

    • Traverse the binary tree to find the paths from the root to nodes X and Y.

    • Compare the paths to find the last common node, which is the Lowest Common Ancestor.

    • Implement a recursive function to efficiently find the LCA.

    • Handle cases where one node is an ancestor of the other.

    • Consider edge cases like when X or Y is the root node.

  • Answered by AI
Round 4 - Face to Face 

(4 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Pretty Good Round. Fast Paced. We covered a lot of ground.

  • Q1. 

    Binary Search Tree Iterator Problem Statement

    Design and implement a class BSTIterator to perform an in-order traversal over a Binary Search Tree (BST). Your implementation should include the following me...

  • Ans. 

    Design and implement a class BSTIterator to perform in-order traversal over a Binary Search Tree (BST).

    • Implement a parameterized constructor to initialize the iterator with the root of the BST.

    • Implement a method 'next()' to return the next smallest element in in-order traversal.

    • Implement a method 'hasNext()' to check if there exists a next smallest element in traversal.

    • Ensure the output is the in-order traversal of the

  • Answered by AI
  • Q2. 

    Maximum Consecutive Ones Problem Statement

    Given a binary array 'ARR' of size 'N', your task is to determine the maximum length of a sequence consisting solely of 1’s that can be obtained by converting at...

  • Ans. 

    Find the maximum length of a sequence of 1's by converting at most K zeroes into ones in a binary array.

    • Iterate through the array and keep track of the current window of 1's and zeroes.

    • Use a sliding window approach to find the maximum length of consecutive 1's by flipping at most K zeroes.

    • Update the window based on the number of zeroes flipped and keep track of the maximum length found so far.

    • Return the maximum length ...

  • Answered by AI
  • Q3. 

    BFS in Graph Problem Statement

    You are given an undirected and disconnected graph G(V, E) having V vertices numbered from 0 to V-1 and E edges. Your task is to print its BFS traversal starting from the 0t...

  • Ans. 

    BFS traversal of an undirected and disconnected graph starting from vertex 0.

    • Start BFS traversal from vertex 0 and visit all connected nodes in sorted order.

    • Use a queue to keep track of nodes to visit next.

    • Keep a visited array to avoid revisiting nodes.

    • Print the BFS traversal path as the nodes are visited.

    • Example: For input V=5, E=4 and edges 0-1, 0-2, 1-3, 2-4, the BFS traversal will be [0, 1, 2, 3, 4].

  • Answered by AI
  • Q4. 

    Dijkstra's Shortest Path Problem Statement

    Given an undirected graph with V vertices (labeled 0, 1, ..., V-1) and E edges, each edge connects two nodes X and Y with a specified weight representing the dis...

  • Ans. 

    Dijkstra's algorithm is used to find the shortest path distance from a source node to all other nodes in an undirected graph.

    • Implement Dijkstra's algorithm to find the shortest path distance from node 0 to all other nodes in the graph.

    • Use a priority queue to efficiently select the next node with the shortest distance.

    • Initialize distances to all nodes as infinity, except for the source node which is 0.

    • Update distances t...

  • Answered by AI
Round 5 - Face to Face 

(1 Question)

Round duration - 60 minutes
Round difficulty - Hard

Bar Raised Round. Definitely felt the difficulty.

  • Q1. 

    First Non-Repeating Character Problem Statement

    You are given a string consisting of English alphabet characters. Your task is to identify and return the first character in the string that does not repeat...

  • Ans. 

    Identify and return the first non-repeating character in a string, or the first character if all characters repeat.

    • Iterate through the string to count the frequency of each character

    • Iterate through the string again to find the first character with frequency 1

    • If no such character is found, return the first character of the string

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 1 in BangaloreEligibility criteriaNo criteriaAmazon interview preparation:Topics to prepare for the interview - Linked Lists, Trees, BFS, DFS, Backtracking, Graphs.Time required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Practice at least 250 Questions, Give yourself enough time for preparation. Cramming won't take you very far. In books, I really liked Elements of Programming Interviews. 
Tip 2 : Make sure to brush up your basics - coding style, OOPs, Language features. They help in making an impression.
Tip 3 : Don't worry about solving the question in the interview. Learn to tackle any random problem with the best of your ability. More often than not, that'd be enough.

Application resume tips for other job seekers

Tip 1 : Keep your resume clean - no graphics, no multiple fonts. Keep it one page.
Tip 2 : Don't go over board in mentioning skills, only mention the things you are truly confident about.

Final outcome of the interviewSelected

Skills evaluated in this interview

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

Round duration - 60 minutes
Round difficulty - Easy

Round 2 - Face to Face 

Round duration - 50 minutes
Round difficulty - Easy

Round 3 - Face to Face 

Round duration - 60 minutes
Round difficulty - Easy

At the beginning of this round, the interviewer asked me about the data structures I knew. Linked lists, trees, graphs, arrays etc. was my answer. He asked me how well I knew Dynamic Programming. I said I wasn’t strong in that and he said that he would ask me a question on dynamic programming for sure.

Round 4 - Face to Face 

Round duration - 40 minutes
Round difficulty - Easy

 

The interviewer asked me if I was comfortable with the interview process so far and how the previous interviews were. I said it was good and he gave me the first problem to solve.

Round 5 - Face to Face 

(1 Question)

Round duration - 60 minutes
Round difficulty - Easy

The interviewer asked me some Com­puter Sci­ence‍ fundamentals in this round as well as some behavioural questions.

  • Q1. Implement a Trie data structure and write functions to insert and search for a few words in it.
  • Ans. 

    Implement a Trie data structure with insert and search functions.

    • Create a TrieNode class with children and isEndOfWord attributes.

    • Implement insert function to add words by iterating through characters.

    • Implement search function to check if a word exists by traversing the Trie.

    • Example: Insert 'apple', 'banana', 'orange' and search for 'apple' and 'grape'.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 1 in HyderabadEligibility criteria 7 CGPA Amazon interview preparation:Topics to prepare for the interview - Data Structures and Algorithms, Operating System, Database Management System, Object-Oriented Programming SystemTime required to prepare for the interview - 8 monthsInterview preparation tips for other job seekers

Do lot of hard work and practice of  Data Structures and Algorithms based questions. I personally recommend you Coding Ninjas and Geeks For Geeks for interview preparation.

Application resume tips for other job seekers

Make your resume short and try to make it of one page only and do mention all your skills which you are confident of in your resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

Interview Questionnaire 

10 Questions

  • Q1. They started with something I did not even think of, Images fundamentals. Making images blurry, making them shaggy
  • Q2. Operating on images in parallel
  • Ans. 

    Operating on images in parallel involves dividing the image into smaller parts and processing them simultaneously.

    • Divide the image into smaller parts using techniques like tiling or splitting

    • Use parallel processing techniques like multi-threading or GPU acceleration

    • Combine the processed parts to form the final image

    • Examples: image segmentation, object detection, image enhancement

  • Answered by AI
  • Q3. Hardware engines support for parallelism
  • Ans. 

    Hardware engines support parallelism through multiple cores and threads.

    • Hardware engines can have multiple cores and threads to execute tasks simultaneously.

    • Parallelism can improve performance and efficiency in hardware-based tasks.

    • Examples include GPUs, FPGAs, and ASICs that have parallel processing capabilities.

    • Hardware parallelism can also be achieved through distributed computing and clustering.

    • Programming language...

  • Answered by AI
  • Q4. OS support for parallelism
  • Ans. 

    Modern OSes support parallelism through multi-core processors and threading.

    • Modern OSes like Windows, macOS, and Linux support parallelism through multi-core processors and threading.

    • Parallelism can be achieved through processes or threads.

    • Parallelism can improve performance and efficiency of software.

    • Examples of parallel programming frameworks include OpenMP and MPI.

  • Answered by AI
  • Q5. Recursion, heap and stack management
  • Q6. Memory protection in OS?
  • Ans. 

    Memory protection is a feature of an operating system that prevents unauthorized access to memory locations.

    • Memory protection is achieved through the use of memory management units (MMUs) and virtual memory.

    • MMUs map virtual addresses to physical addresses and enforce access permissions.

    • Virtual memory allows the OS to allocate memory to processes in a way that isolates them from each other.

    • Examples of memory protection ...

  • Answered by AI
  • Q7. Interviewer asked my laptop’s configuration and then asked some hardware questions about it
  • Q8. You have a lot of small integers in an array. You have to multiply all of them. You need not worry about overflow and range, you have enough support for that. What can you do to speed up the multiplication...
  • Ans. 

    To speed up multiplication of small integers in an array, we can use bitwise operations and parallel processing.

    • Use bitwise operations like shifting and ANDing to perform multiplication faster.

    • Divide the array into smaller chunks and perform multiplication in parallel using multi-threading or SIMD instructions.

    • Use lookup tables for frequently used values to avoid repeated calculations.

    • Use compiler optimizations like lo...

  • Answered by AI
  • Q9. Design a data structure for excel spreadsheet?
  • Ans. 

    Design a data structure for excel spreadsheet

    • Use a 2D array to store cell values

    • Implement formulas using a stack

    • Include formatting options for cells

  • Answered by AI
  • Q10. Tower of hanoi?

Interview Preparation Tips

Round: Technical Interview
Experience: Some other fundamentals Adobe people were amazingly helpful about computer architecture because I had written it in CV.

Round: Technical Interview
Experience: They started with OS and other subjects of their requirements such as data structures.

Round: Technical Interview
Experience: It was the best one. coding questions and algorithmic thinking was checked. Project work was also discussed.

Skills: Data Structure, Algorithm, OS
College Name: MNIT Jaipur

Skills evaluated in this interview

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 mintues
Round difficulty - Easy

Timing it is around 1 pm, Environment is very friendly.

  • Q1. 

    Equilibrium Index Problem Statement

    Given an array Arr consisting of N integers, your task is to find the equilibrium index of the array.

    An index is considered as an equilibrium index if the sum of elem...

  • Ans. 

    Find the equilibrium index of an array where sum of elements on left equals sum of elements on right.

    • Iterate through the array and calculate the total sum of elements.

    • For each index, calculate the sum of elements on the left and right side and check for equilibrium.

    • Return the left-most equilibrium index found, or -1 if none exist.

  • Answered by AI
  • Q2. 

    Maximum Meetings Problem Statement

    Given the schedule of N meetings with their start time Start[i] and end time End[i], you need to determine which meetings can be organized in a single meeting room such ...

  • Ans. 

    Given N meetings with start and end times, find the maximum number of meetings that can be organized in a single room without overlap.

    • Sort the meetings based on end times.

    • Iterate through the sorted meetings and select the next meeting whose start time is greater than or equal to the end time of the previous meeting.

    • Return the selected meetings in the order they are organized.

  • Answered by AI
Round 2 - Video Call 

(2 Questions)

Round duration - 90 mintues
Round difficulty - Hard

Timing it is around 1 pm and Environment is good .

  • Q1. Explain how to overload the pre and post-increment operators in object-oriented programming.
  • Ans. 

    Overloading pre and post-increment operators in OOP involves defining special member functions for the class.

    • Define member functions for pre-increment (++obj) and post-increment (obj++) operators in the class.

    • For pre-increment, return a reference to the modified object after incrementing the value.

    • For post-increment, return a copy of the original object before incrementing the value.

    • Example: class Counter { int value; ...

  • Answered by AI
  • Q2. 

    Longest Zero Sum Subarray Problem

    Given an array of integers consisting of both positive and negative numbers, find the length of the longest subarray whose sum is zero. This problem will be presented wit...

  • Ans. 

    Find the length of the longest subarray with zero sum in an array of integers.

    • Iterate through the array and keep track of the running sum using a hashmap.

    • If the running sum is seen before, it means there is a subarray with zero sum.

    • Calculate the length of the subarray with zero sum and update the maximum length found so far.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 1 in HyderabadEligibility criteria8 CGPA aboveAdobe interview preparation:Topics to prepare for the interview - Linked List, Binary Search Tree ,Queue, Array ,DP ,Graph ,RecursionTime required to prepare for the interview - 3 monthInterview preparation tips for other job seekers

Tip 1 : Practice Atleast 500 Questions
Tip 2 : Do atleast 1 good projects
Tip 3 : You should be able to explain your project

Application resume tips for other job seekers

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

Google Interview FAQs

How many rounds are there in Google Python Developer interview?
Google interview process usually has 3 rounds. The most common rounds in the Google interview process are Coding Test, Technical and HR.
What are the top questions asked in Google Python Developer interview?

Some of the top questions asked at the Google Python Developer interview -

  1. 6.What are local variables and global variables in Python? 7.When to use a tupl...read more
  2. 11.What is the namespace in Python? 12.What is a dictionary in Python? 13.What ...read more
  3. 1. What is Python? 2. What Are Python Advantages? 3. Why do you we use in pytho...read more

Tell us how to improve this page.

Google Python Developer Salary
based on 7 salaries
₹1.2 L/yr - ₹6.6 L/yr
5% less than the average Python Developer Salary in India
View more details
Software Engineer
1.9k salaries
unlock blur

₹20 L/yr - ₹75 L/yr

Software Developer
1.2k salaries
unlock blur

₹21.2 L/yr - ₹65.1 L/yr

Senior Software Engineer
753 salaries
unlock blur

₹24 L/yr - ₹80 L/yr

Data Scientist
290 salaries
unlock blur

₹12 L/yr - ₹50 L/yr

Sde1
239 salaries
unlock blur

₹15 L/yr - ₹61.2 L/yr

Explore more salaries
Compare Google with

Yahoo

4.6
Compare

Amazon

4.1
Compare

Facebook

4.3
Compare

Microsoft Corporation

4.0
Compare
Did you find this page helpful?
Yes No
write
Share an Interview