Sdet

100+ Sdet Interview Questions and Answers

Updated 16 Jul 2025
search-icon
2d ago

Q. Given an 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, where...

read more
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

Asked in InMobi

2d ago

Q. Given a line where words are separated by spaces, reverse each word and capitalize its first letter. The other letters of the word should be in lowercase. For example, Input: “how are you?” → Output: “Woh Era ?...

read more
Ans.

The program takes a string as input and capitalizes the first letter of each reversed word while keeping the rest of the letters in lowercase.

  • Split the input string into an array of words using the space as a delimiter

  • Iterate through each word in the array

  • Reverse the word and capitalize the first letter

  • Join the modified words back into a single string with spaces in between

Sdet Interview Questions and Answers for Freshers

illustration image

Asked in Amazon

5d ago

Q. What happens between entering a URL into a browser address bar and the page loading?

Ans.

When entering a URL and hitting enter, the browser performs DNS lookup, establishes a TCP connection, sends an HTTP request, receives the response, and renders the page.

  • Browser performs DNS lookup to resolve the domain name to an IP address

  • Browser establishes a TCP connection with the server

  • Browser sends an HTTP request to the server

  • Server processes the request and sends back an HTTP response

  • Browser receives the response and starts rendering the page

4d ago

Q. Given a circular linked list containing sorted integers, where the head points to a random node, write code to insert a new node at its correct sorted position. For example, given the list 34, 44, 67, 99, 3, 17...

read more
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

Are these interview questions helpful?

Asked in Flipkart

3d ago

Q. Given a sorted array of size 7 containing only 4 elements and another sorted array of 3 elements, how would you merge the elements from the second array into the first array while maintaining the sorted order?

Ans.

Combine 4 elements of a sorted array of size 7 and a sorted array of 3 elements to make a sorted array.

  • Insert the 3 elements of the smaller array into the larger array

  • Sort the larger array using any sorting algorithm

Asked in Amazon

5d ago

Q. how will you check that each page of amazon.com is having its logo or not.he also asked me to write code for this also

Ans.

To check if each page of Amazon.com has its logo, we can use automated testing with Selenium WebDriver.

  • Use Selenium WebDriver to navigate to each page of Amazon.com

  • Locate the logo element on each page using its XPath or CSS selector

  • Verify that the logo element is displayed on each page

Sdet Jobs

Amazon Development Centre (India) Pvt. Ltd. logo
SDET, WW Installments 5-10 years
Amazon Development Centre (India) Pvt. Ltd.
4.0
Bangalore / Bengaluru
Wipro logo
Full Stack SDET 5-9 years
Wipro
3.7
Bangalore / Bengaluru
Wipro Limited logo
SDET Python Coding - Lead 5-8 years
Wipro Limited
3.7
Hyderabad / Secunderabad

Asked in InMobi

1d ago

Q. Given two sets of countries, one donating clothes and the other accepting, and the amount of clothes donated, maximize the total amount of clothes donated such that there is a one-to-one relationship between co...

read more
Ans.

Maximize clothes donation between two sets of countries with one-to-one relationships.

  • Identify countries in set 1 and set 2.

  • Create a graph where edges represent donations between countries.

  • Use a maximum bipartite matching algorithm (e.g., Hopcroft-Karp) to find optimal pairs.

  • Calculate total donations based on matched pairs.

  • Example: If country A donates to country B, ensure A doesn't donate to another country.

Asked in Google

2d ago

Q. 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?

Ans.

To design a search engine with keyword-based document indexing and numeric attributes, we need to build appropriate indices.

  • Create an inverted index for each keyword, mapping it to the documents that contain it

  • For numeric attributes, use a B-tree or other appropriate data structure to store the values and their associated documents

  • Combine the indices to allow for complex queries, such as keyword and attribute filters

  • Consider using stemming or other text processing techniques ...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop
2d ago

Q. Describe how the McDonald's system works, starting from placing the order, transferring the order to the kitchen, billing, and the final delivery to the customer, in terms of data structures used, information v...

read more
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 time, using a queue data structure.

  • 4. Billing is processed at...read more

1d ago

Q. Design data structures to delete pages from a web server that are no longer in existence, have no links on the website, have expired, are no longer in use, and have no reference on any of the pages on the curre...

read more
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 periodically scans for and removes pages with no referenc...read more

Asked in Google

2d ago

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

Asked in Amazon

3d ago

Q. You are given an application like Google Analytics. How will you test this application?

Ans.

Testing Google Analytics involves validating data accuracy, user interface, performance, and integration with other tools.

  • Verify data accuracy by comparing reported metrics with raw data from the source.

  • Test user interface for usability and accessibility, ensuring all elements are intuitive.

  • Conduct performance testing to ensure the application can handle high traffic without degradation.

  • Check integration with other tools (e.g., Google Ads) to ensure data flows correctly betwe...read more

Asked in Amazon

2d ago

Q. What are the basic features you would add to your own test framework?

Ans.

A test framework should have features like test case management, test data management, reporting, and integration with CI/CD tools.

  • Test case management: Ability to create, organize, and execute test cases.

  • Test data management: Ability to manage test data and generate test data sets.

  • Reporting: Ability to generate detailed test reports with metrics and logs.

  • Integration with CI/CD tools: Ability to integrate with tools like Jenkins for continuous integration and delivery.

  • Paralle...read more

Asked in Amazon

1d ago

Q. Have you worked on any automation framework?

Ans.

Yes, I have worked on automation frameworks.

  • I have experience in developing and maintaining automation frameworks using tools like Selenium, TestNG, and Cucumber.

  • I have also worked on customizing existing frameworks to meet specific project requirements.

  • I am familiar with both data-driven and keyword-driven frameworks.

  • I have integrated automation frameworks with CI/CD pipelines for continuous testing.

  • One example of a project where I worked on an automation framework was for a...read more

Asked in Flipkart

3d ago

Q. How do you determine if a string is a palindrome?

Ans.

To check if a string is a palindrome, compare the first and last characters, then move towards the center.

  • Remove all non-alphanumeric characters and convert to lowercase

  • Use two pointers, one starting from the beginning and the other from the end

  • Compare the characters at both pointers, move towards the center until they meet

  • If all characters match, the string is a palindrome

Asked in Flipkart

3d ago

Q. Given a table of student names and grades, output a table containing each grade and its frequency in descending order.

Ans.

Calculate the frequency of each grade from a student table and sort it in descending order.

  • Use SQL query: SELECT grade, COUNT(*) as frequency FROM students GROUP BY grade ORDER BY frequency DESC.

  • Example table: | Name | Grade | |-------|-------| | Alice | A | | Bob | B | | Carol | A |

  • Resulting output: | Grade | Frequency | |-------|-----------| | A | 2 | | B | 1 |

Asked in Google

3d ago

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.

  • Find the pivot point where the array is rotated

  • Perform binary search on the two sorted subarrays

  • Return the index of the found integer

4d ago

Q. How do you achieve parallel execution of test cases in TestNG?

Ans.

Parallel execution of test cases in TestNG can be achieved using TestNG's parallel attribute in the testng.xml file.

  • Set the 'parallel' attribute in the testng.xml file to 'methods', 'classes', or 'tests' to specify the level of parallelism.

  • Use the 'thread-count' attribute to specify the number of threads to be used for parallel execution.

  • Ensure that the test classes are thread-safe to avoid any conflicts during parallel execution.

Asked in Amazon

5d ago

Q. You are given a web page with a browse button and an image holder. Write the test cases for this.

Ans.

Test cases for a web page with a browse button and an image holder.

  • Verify that the browse button is displayed on the page.

  • Check that the image holder is empty before any image is uploaded.

  • Test uploading a valid image file and ensure it appears in the image holder.

  • Attempt to upload an invalid file type (e.g., .txt) and verify an error message is shown.

  • Ensure that the image holder can display various image formats (e.g., .jpg, .png).

  • Check the maximum file size limit for uploads...read more

5d ago

Q. Write test cases for an API that creates a user profile by accepting first name, last name, and mobile number.

Ans.

Test cases for API creating User's profile with First name, Last name, and mobile number

  • Verify that a user profile is created successfully with valid First name, Last name, and mobile number

  • Test with invalid First name (empty, special characters, numbers)

  • Test with invalid Last name (empty, special characters, numbers)

  • Test with invalid mobile number (empty, alphabets, special characters, less than 10 digits)

  • Verify that duplicate profiles are not created for the same mobile num...read more

Asked in Google

6d ago

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 in Amazon

5d ago

Q. Given a singly linked list, write a recursive method to reverse every 3 nodes in the list. He asked me to inform if I have seen the question

Ans.

Reverse every 3 nodes in a singly linked list using recursion.

  • Create a recursive method that takes the head of the linked list as input.

  • If the head is null or there are less than 3 nodes remaining, return the head.

  • Reverse the first 3 nodes by swapping their pointers.

  • Recursively call the method on the next 3 nodes and update the pointers accordingly.

  • Return the new head of the reversed linked list.

Asked in Google

3d ago

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 'Tie'

  • If no winning combination is found and the board is not f...read more

5d ago

Q. What are the reasons for a 500 Internal Server Error?

Ans.

500 Internal Server Error is a generic error message indicating a problem with the server.

  • Server misconfiguration

  • Server overload

  • Programming errors in server-side code

  • Database connection issues

  • Insufficient server resources

3d ago

Q. Design an algorithm for a new type of contact search application for 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 access, e.g., 'Call Mom'.

  • Provide suggestions based on user b...read more

Asked in Google

2d ago

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

Asked in Amazon

5d ago

Q. What is the maximum length of a contiguous sub-array containing distinct elements in a given character array?

Ans.

Find the maximum subsequent distinct and contiguous subarray in a character array.

  • Use a sliding window approach to iterate through the array.

  • Keep track of the distinct characters in the current subarray.

  • Update the maximum length and subarray as necessary.

Asked in Flipkart

4d ago

Q. How do you determine if two given linked lists intersect?

Ans.

To find if two linked lists intersect, traverse both lists and compare their tail nodes.

  • Traverse both linked lists and find their lengths

  • If the lengths are different, move the longer list's head pointer to the difference in length

  • Now traverse both lists and compare their nodes until a common node is found

  • If no common node is found, the lists do not intersect

1d ago

Q. Write a program to reverse the order of words in a given string. For example, if the input is "My name is abc", the output should be "abc is name My".

Ans.

Program to reverse words in a string

  • Split the input string into an array of words

  • Reverse the array of words

  • Join the reversed array back into a string

3d ago

Q. How would you design the database for Facebook?

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 shares, enabling quick access to user-generated content.

  • Ne...read more

1
2
3
4
5
Next

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Amazon Logo
4.0
 • 5.4k Interviews
LTIMindtree Logo
3.7
 • 3k Interviews
Paytm Logo
3.2
 • 805 Interviews
Info Edge Logo
3.9
 • 348 Interviews
View all
Interview Tips & Stories
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Sdet Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits