Upload Button Icon Add office photos

Google

Compare button icon Compare button icon Compare

Filter interviews by

Google Sdet Interview Questions and Answers

Updated 28 Oct 2024

12 Interview questions

A Sdet was asked
Q. How would you efficiently implement three stacks using a single array?
Ans. 

Implement 3 stacks in a single array efficiently

  • Divide the array into 3 equal parts

  • Use pointers to keep track of top of each stack

  • Implement push and pop operations for each stack

  • Handle stack overflow and underflow cases

A Sdet was asked
Q. Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram. Solve it in linear time.
Ans. 

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

  • Use a stack to keep track of the bars in the histogram

  • For each bar, calculate the area of the rectangle it can form

  • Pop the bars from the stack until a smaller bar is encountered

  • Keep track of the maximum area seen so far

  • Return the maximum area

Sdet Interview Questions Asked at Other Companies

Q1. Given an M x N 2D array containing random alphabets and a functio ... read more
asked in InMobi
Q2. Given a line where words are separated by spaces, reverse each wo ... read more
asked in Amazon
Q3. What happens between entering a URL into a browser address bar an ... read more
Q4. Given a circular linked list containing sorted integers, where th ... read more
asked in Flipkart
Q5. Given a sorted array of size 7 containing only 4 elements and ano ... read more
A Sdet was asked
Q. Write a program to find the depth of a binary search tree without using recursion.
Ans. 

Program to find depth of binary search tree without recursion

  • Use a stack to keep track of nodes and their depths

  • Iteratively traverse the tree and update the maximum depth

  • Return the maximum depth once traversal is complete

A Sdet was asked
Q. What kind of data structure would you use to index anagrams of words? For example, if the word 'top' exists in the database, a query for 'pot' should list it.
Ans. 

Use a hash map to index anagrams by sorting characters as keys.

  • Create a hash map where the key is the sorted string of characters.

  • For example, 'top' and 'pot' both map to 'opt'.

  • Store all anagrams in a list associated with the sorted key.

  • When querying, sort the input word and retrieve the list from the map.

🔥 Asked by recruiter 2 times
A Sdet was asked
Q. Given an array of integers that is circularly sorted, how do you find a given integer?
Ans. 

To find a given integer in a circularly sorted array of integers, use binary search with slight modifications.

  • Find the middle element of the array.

  • If the middle element is the target, return its index.

  • If the left half of the array is sorted and the target is within that range, search the left half.

  • If the right half of the array is sorted and the target is within that range, search the right half.

  • If the left half i...

A Sdet was asked
Q. Most phones now have full keyboards. Before, there were three letters mapped to a number button. Describe how you would implement spelling and word suggestions as people type.
Ans. 

Implement spelling and word suggestions for full keyboard phones

  • Create a dictionary of commonly used words

  • Use algorithms like Trie or Levenshtein distance to suggest words

  • Implement auto-correct feature

A Sdet was asked
Q. How would you determine if someone has won a game of tic-tac-toe on a board of any size?
Ans. 

To determine if someone has won a game of tic-tac-toe on a board of any size, we need to check all possible winning combinations.

  • Create a function to check all rows, columns, and diagonals for a winning combination

  • Loop through the board and call the function for each row, column, and diagonal

  • If a winning combination is found, return the player who won

  • If no winning combination is found and the board is full, return...

Are these interview questions helpful?
🔥 Asked by recruiter 2 times
A Sdet was asked
Q. 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.
Ans. 

Replace each number in an array with the product of all other numbers without using division.

  • Iterate through the array and calculate the product of all numbers to the left of the current index.

  • Then, iterate through the array again and calculate the product of all numbers to the right of the current index.

  • Multiply the left and right products to get the final product and replace the current index with it.

A Sdet was asked
Q. Create a cache with fast look up that only stores the N most recently accessed items
Ans. 

Create a cache with fast look up that only stores the N most recently accessed items

  • Implement a hash table with doubly linked list to store the items

  • Use a counter to keep track of the most recently accessed items

  • When the cache is full, remove the least recently accessed item

A Sdet was asked
Q. Given two files containing a list of words (one per line), write a program to find and display the intersection of the words in both files.
Ans. 

Program to find intersection of words in two files

  • Read both files and store words in two arrays

  • Loop through one array and check if word exists in other array

  • Print the common words

Google Sdet Interview Experiences

2 interviews found

Sdet Interview Questions & Answers

user image Rahul c

posted on 28 Oct 2024

Interview experience
4
Good
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
No response

I applied via Walk-in and was interviewed in Apr 2024. There was 1 interview round.

Round 1 - Coding Test 

Solve sanke and ladder puzzle

Interview Preparation Tips

Interview preparation tips for other job seekers - learn DSA

Sdet Interview Questions & Answers

user image Anonymous

posted on 8 Jun 2015

Interview Questionnaire 

12 Questions

  • Q1. Efficiently implement 3 stacks in a single array
  • Ans. 

    Implement 3 stacks in a single array efficiently

    • Divide the array into 3 equal parts

    • Use pointers to keep track of top of each stack

    • Implement push and pop operations for each stack

    • Handle stack overflow and underflow cases

  • Answered by AI
  • Q2. Given an array of integers which is circularly sorted, how do you find a given integer
  • Q3. Write a program to find depth of binary search tree without using recursion
  • Ans. 

    Program to find depth of binary search tree without recursion

    • Use a stack to keep track of nodes and their depths

    • Iteratively traverse the tree and update the maximum depth

    • Return the maximum depth once traversal is complete

  • Answered by AI
  • Q4. Find the maximum rectangle (in terms of area) under a histogram in linear time
  • Ans. 

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

    • Use a stack to keep track of the bars in the histogram

    • For each bar, calculate the area of the rectangle it can form

    • Pop the bars from the stack until a smaller bar is encountered

    • Keep track of the maximum area seen so far

    • Return the maximum area

  • Answered by AI
  • Q5. 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
  • Ans. 

    Implement spelling and word suggestions for full keyboard phones

    • Create a dictionary of commonly used words

    • Use algorithms like Trie or Levenshtein distance to suggest words

    • Implement auto-correct feature

  • Answered by AI
  • Q6. Describe recursive mergesort and its runtime. Write an iterative version in C++/Java/Python
  • Ans. 

    Recursive mergesort divides array into halves, sorts them and merges them back. O(nlogn) runtime.

    • Divide array into halves recursively

    • Sort each half recursively using mergesort

    • Merge the sorted halves back together

    • Runtime is O(nlogn)

    • Iterative version can be written using a stack or queue

  • Answered by AI
  • Q7. How would you determine if someone has won a game of tic-tac-toe on a board of any size?
  • Ans. 

    To determine if someone has won a game of tic-tac-toe on a board of any size, we need to check all possible winning combinations.

    • Create a function to check all rows, columns, and diagonals for a winning combination

    • Loop through the board and call the function for each row, column, and diagonal

    • If a winning combination is found, return the player who won

    • If no winning combination is found and the board is full, return 'Tie...

  • Answered by AI
  • Q8. 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
  • Ans. 

    Replace each number in an array with the product of all other numbers without using division.

    • Iterate through the array and calculate the product of all numbers to the left of the current index.

    • Then, iterate through the array again and calculate the product of all numbers to the right of the current index.

    • Multiply the left and right products to get the final product and replace the current index with it.

  • Answered by AI
  • Q9. Create a cache with fast look up that only stores the N most recently accessed items
  • Ans. 

    Create a cache with fast look up that only stores the N most recently accessed items

    • Implement a hash table with doubly linked list to store the items

    • Use a counter to keep track of the most recently accessed items

    • When the cache is full, remove the least recently accessed item

  • Answered by AI
  • Q10. How to design a search engine? If each document contains a set of keywords, and is associated with a numeric attribute, how to build indices?
  • Q11. Given two files that has list of words (one per line), write a program to show the intersection
  • Ans. 

    Program to find intersection of words in two files

    • Read both files and store words in two arrays

    • Loop through one array and check if word exists in other array

    • Print the common words

  • Answered by AI
  • Q12. What kind of data structure would you use to index annagrams of words? e.g. if there exists the word ?top? in the database, the query for ?pot? should list that
  • Ans. 

    Use a hash map to index anagrams by sorting characters as keys.

    • Create a hash map where the key is the sorted string of characters.

    • For example, 'top' and 'pot' both map to 'opt'.

    • Store all anagrams in a list associated with the sorted key.

    • When querying, sort the input word and retrieve the list from the map.

  • Answered by AI

Interview Preparation Tips

College Name: NA

Skills evaluated in this interview

Top trending discussions

View All
Interview Tips & Stories
6d (edited)
a team lead
Why are women still asked such personal questions in interview?
I recently went for an interview… and honestly, m still trying to process what just happened. Instead of being asked about my skills, experience, or how I could add value to the company… the questions took a totally unexpected turn. The interviewer started asking things like When are you getting married? Are you engaged? And m sure, if I had said I was married, the next question would’ve been How long have you been married? What does my personal life have to do with the job m applying for? This is where I felt the gender discrimination hit hard. These types of questions are so casually thrown at women during interviews but are they ever asked to men? No one asks male candidates if they’re planning a wedding or how old their kids are. So why is it okay to ask women? Can we please stop normalising this kind of behaviour in interviews? Our careers shouldn’t be judged by our relationship status. Period.
Got a question about Google?
Ask anonymously on communities.

Interview questions from similar companies

Interview Questionnaire 

9 Questions

  • Q1. First one was to find position of a box in a particular grid(4*4) boxes were numbered 0 to 15.Questions was also to write test cases and check every possibilty
  • Q2. Second question was card shuffling problem
  • Q3. One question was think how the database design of Facebook could be
  • Ans. 

    Facebook's database design focuses on scalability, user relationships, and efficient data retrieval.

    • User Profiles: Each user has a unique profile containing personal information, posts, and friend connections.

    • Social Graph: A graph database structure to represent relationships between users, allowing for efficient querying of friends and connections.

    • Posts and Interactions: Tables for storing posts, likes, comments, and ...

  • Answered by AI
  • Q4. And there were few more coding questions on data structures
  • Q5. It was basically 1 question round but that had two parts . one designing the algorithm optimally . And writting and covering all possible scenarios and write test cases for them.It was based on deleting el...
  • Q6. This round covered Data structure based prograaming as well OS concepts on multithreading as well
  • Q7. One question was to design data structures to delete pages from a web server which are no longer in existense and have no link on website .That is pages which have expired and no longer in use and has no r...
  • Ans. 

    Design a data structure to efficiently manage and delete expired web pages without references.

    • Use a hash table to store active pages with their URLs as keys for quick access.

    • Implement a linked list to maintain the order of pages for easy deletion of expired pages.

    • Utilize a timestamp to track the last access time of each page, allowing for easy identification of expired pages.

    • Consider a garbage collection mechanism that...

  • Answered by AI
  • Q8. One question to desgin lift system and waht whould be the design
  • Q9. This was the last round .Questions based on college projects and training project was asked.A question was asked to design an algorithm for a new type of contact search application of mobile phones
  • Ans. 

    Design an algorithm for a mobile contact search application that enhances user experience and efficiency.

    • Utilize a trie data structure for efficient prefix searching of contact names.

    • Implement fuzzy search to handle typos or partial matches, e.g., searching 'Jon' returns 'John'.

    • Incorporate filters for sorting results by frequency of contact usage or recent interactions.

    • Allow voice search functionality for hands-free ac...

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: 10 Objective type questions mainly from data structures.Questions on structures,union , trees,graphs etc First question was purely coding in most optimized way and taking care of all conditions possible. Second Question was to write test cases for print server job execution getting print jobs from different hostels of a college. Third question was to design a Data structure for a billing system keeping in mind certain conditions and write a program to generate and store the bills.
Total Questions: 10

College Name: NA

Interview Questionnaire 

4 Questions

  • Q1. Given a M x N 2D array containing random alphabets and a function Dict(string word) which returns whether the 'word' is a valid English word. Find all possible valid words you can get from the 2D array, wh...
  • Ans. 

    Given a 2D array of alphabets and a function to check valid English words, find all possible valid words adjacent to each other.

    • Create a recursive function to traverse the 2D array and check for valid words

    • Use memoization to avoid redundant checks

    • Consider edge cases such as words with repeating letters

    • Optimize the algorithm for time and space complexity

  • Answered by AI
  • Q2. Given a circular linked list containing sorted elements (int value). The head of the linked list points to a random node (not necessarily to the smallest or largest element). Problem is top write a code wh...
  • Ans. 

    Insert a node at its correct position in a circular linked list containing sorted elements.

    • Traverse the linked list until the correct position is found

    • Handle the case where the value to be inserted is smaller than the smallest element or larger than the largest element

    • Update the pointers of the neighboring nodes to insert the new node

    • Consider the case where the linked list has only one node

  • Answered by AI
  • Q3. Suppose you are asked to design the Contacts feature for a mobile, what are the features you will enable for the same? Also, how will you test each of those feature?
  • Q4. Describe how does the McDonald's system work, starting from placing the order, transferring of the order to kitchen, billing and the final delivery to customer, in terms of data structures used, informatio...
  • Ans. 

    McDonald's order system involves structured data flow from order placement to delivery, ensuring efficiency and accuracy.

    • 1. Customer places an order using a digital kiosk or cashier, which captures order details in a structured format (e.g., JSON).

    • 2. The order is sent to the kitchen display system (KDS), where it is displayed for kitchen staff to prepare.

    • 3. The KDS organizes orders based on priority and preparation tim...

  • Answered by AI

Interview Preparation Tips

College Name: NA

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
-

I applied via Instahyre and was interviewed in Nov 2024. There was 1 interview round.

Round 1 - Coding Test 

It was on hackerrank(OA). There were two string and array based medium question.(Part of Blind 75 list)

Sdet Interview Questions & Answers

Adobe user image Anonymous

posted on 20 Mar 2023

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Coding Test 

Coding practice is a must . DSA concept is a must .

Round 3 - Aptitude Test 

Coding Test 2 which involved a basic array ques . Checked logic ability

Interview Preparation Tips

Interview preparation tips for other job seekers - DSA practice ,confidence , try to think hard . Practice coding .

Sdet Interview Questions & Answers

Oracle user image Anonymous

posted on 14 Jun 2024

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(1 Question)

  • Q1. Write selenium code for getting values in a dynamic table
  • Ans. 

    Use Selenium to extract values from a dynamic table

    • Identify the table using its locator (id, class, xpath, etc.)

    • Iterate through the rows and columns of the table to extract values

    • Use Selenium commands like findElements and getText to retrieve the values

    • Handle dynamic content by waiting for elements to be present or visible

  • Answered by AI
Round 2 - Technical 

(1 Question)

  • Q1. Java union of arrays
  • Ans. 

    To find the union of two arrays in Java, use a HashSet to store unique elements from both arrays.

    • Create two arrays of strings.

    • Convert arrays to HashSet to remove duplicates.

    • Combine both HashSets to get the union of arrays.

  • Answered by AI
Round 3 - One-on-one 

(1 Question)

  • Q1. Regular Expressions related

Interview Preparation Tips

Interview preparation tips for other job seekers - Be good with Basics and lots of practice is the key

Skills evaluated in this interview

Are these interview questions helpful?

Sdet Interview Questions & Answers

Oracle user image Anonymous

posted on 26 Oct 2023

Interview experience
4
Good
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
-

I applied via Naukri.com

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Don’t add your photo or details such as gender, age, and address in your resume. These details do not add any value.
View all tips
Round 2 - Coding Test 

Asked to write a program for Number palindrome

Round 3 - Technical 

(1 Question)

  • Q1. Java Oops and selenium basics

Interview Preparation Tips

Interview preparation tips for other job seekers - Be clear with the basics

I applied via Approached by Company and was interviewed before Jun 2021. There were 2 interview rounds.

Round 1 - System test 

(1 Question)

  • Q1. Advantage and disadvantage of framework.
  • Ans. 

    Frameworks provide structure and pre-built components for software development, but can also limit flexibility and require learning curve.

    • Advantage: Provides structure and pre-built components for faster development

    • Advantage: Can improve code quality and maintainability

    • Disadvantage: Can limit flexibility and customization

    • Disadvantage: Requires learning curve and potential dependency issues

    • Example: ReactJS provides a fr...

  • Answered by AI
Round 2 - Technical 

(1 Question)

  • Q1. What is Oops? Advantage and disadvantage
  • Ans. 

    Oops stands for Object-Oriented Programming. It is a programming paradigm that uses objects to represent real-world entities.

    • Advantages: code reusability, modularity, encapsulation, inheritance, polymorphism

    • Disadvantages: complexity, steep learning curve, performance overhead

    • Example: creating a class 'Car' with properties like 'make', 'model', and 'year', and methods like 'start_engine' and 'stop_engine'

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare basics in server side and client side coding

Skills evaluated in this interview

I applied via Company Website and was interviewed before Oct 2019. There were 4 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. 1. Core Java - OOPS features, Abstract classes and Interface, Inner Classes, String and Object Class, Equals and HashCode methods, Runtime and Compile time exception, Method overloading and overriding, Cus...

Interview Preparation Tips

Interview preparation tips for other job seekers - 1. Clear Core java concepts firmly
2. Basic DB queries
3. Basic Unix commands

Google Interview FAQs

How many rounds are there in Google Sdet interview?
Google interview process usually has 1 rounds. The most common rounds in the Google interview process are Coding Test.
What are the top questions asked in Google Sdet interview?

Some of the top questions asked at the Google Sdet interview -

  1. How to design a search engine? If each document contains a set of keywords, and...read more
  2. Most phones now have full keyboards. Before there there three letters mapped to...read more
  3. Given an array of integers which is circularly sorted, how do you find a given ...read more

Tell us how to improve this page.

Overall Interview Experience Rating

4.5/5

based on 2 interview experiences

Difficulty level

Moderate 100%

Duration

Less than 2 weeks 50%
2-4 weeks 50%
View more

Interview Questions from Similar Companies

Oracle Interview Questions
3.7
 • 894 Interviews
Zoho Interview Questions
4.3
 • 537 Interviews
Amdocs Interview Questions
3.7
 • 532 Interviews
KPIT Technologies Interview Questions
3.3
 • 306 Interviews
SAP Interview Questions
4.2
 • 291 Interviews
Adobe Interview Questions
3.9
 • 247 Interviews
Salesforce Interview Questions
4.0
 • 234 Interviews
Chetu Interview Questions
3.3
 • 198 Interviews
View all
Google Sdet Salary
based on 16 salaries
₹17.5 L/yr - ₹32.6 L/yr
66% more than the average Sdet Salary in India
View more details

Google Sdet Reviews and Ratings

based on 1 review

5.0/5

Rating in categories

5.0

Skill development

5.0

Work-life balance

5.0

Salary

5.0

Job security

5.0

Company culture

5.0

Promotions

5.0

Work satisfaction

Explore 1 Review and Rating
Software Engineer
3k salaries
unlock blur

₹33 L/yr - ₹65 L/yr

Software Developer
2.1k salaries
unlock blur

₹33.2 L/yr - ₹61.6 L/yr

Senior Software Engineer
1.2k salaries
unlock blur

₹35.9 L/yr - ₹70 L/yr

Sde1
398 salaries
unlock blur

₹32.6 L/yr - ₹60 L/yr

Data Scientist
379 salaries
unlock blur

₹26.8 L/yr - ₹50 L/yr

Explore more salaries
Compare Google with

Yahoo

4.6
Compare

Amazon

4.0
Compare

Facebook

4.3
Compare

Microsoft Corporation

3.9
Compare
write
Share an Interview