You are given a list of customer IDs in a Python list, which might contain duplicates. Write a Python function that uses a HashSet to determine if there are any duplicates in the list.
Please sign-in to view the solution
Describe at least three different types of authentication methods commonly used in RESTful APIs. Provide brief explanations and examples of each.
Please sign-in to view the solution
Write a Python script using Selenium WebDriver to print all the links (<a>
tags) from a web page. The script should open the specified web page, find all the links, and then print out the text and the URL for each link.
Please sign-in to view the solution
Define the Bug Life Cycle and explain its importance in the software development and testing process. Provide the typical stages involved and briefly describe each stage.
Please sign-in to view the solution
Describe the different tests that should be conducted on an electric kettle to ensure its safety, functionality, and user experience. Include functionality, performance, safety, and usability tests.
Please sign-in to view the solution
Write a Java program to check if a given string is a palindrome. A palindrome is a word, number, phrase, or other sequence of characters that reads the same forward and backward (ignoring spaces, punctuation, and capitalization).
Please sign-in to view the solution
Suppose you are working with a SQL database, and you have a table sales_data
with columns product_id
, region
, and sales_amount
. You have noticed that there are some missing values in the sales_amount
column for certain region
s.
Write a SQL query to identify all regions where any sales_amount
value is missing.
Please sign-in to view the solution
You are given a singly linked list and you need to write a function in Python to reverse the linked list. Assume the linked list node is defined as follows:
class ListNode:
def __init__(self, value=0, next=None):
self.value = value
self.next = next
Write a function reverse_linked_list
that takes the head of the linked list as an argument and returns the new head of the reversed list.
Please sign-in to view the solution
Describe the differences between List, Set, and Map in Java Collections. Provide examples of common implementations for each type and explain when you would use them.
Please sign-in to view the solution
List and describe possible test cases for a typical login form. Include both functional and non-functional test cases, covering various scenarios and edge cases.
Please sign-in to view the solution
Explain the key steps and considerations in designing a database. Include how you would handle requirements gathering, schema design, normalization, indexing, and ensuring data integrity.
Please sign-in to view the solution
Explain how to replace parts of a string using regular expressions (regex) in Python. Provide example code demonstrating the use of the re.sub
function for this purpose.
Please sign-in to view the solution
Describe your approach to testing a scenario where a telecom provider is launching a new plan package for new customers. Include steps to ensure that old customers are not affected.
Please sign-in to view the solution
Question: You are given a table named Sales
with the following structure:
Sales
:sale_id
(INTEGER)product_id
(INTEGER)sale_amount
(FLOAT)sale_date
(DATE)customer_id
(INTEGER)
Write an SQL query to find the total sales amount for each product for the month of January 2022. The result should include product_id
along with the total sales amount and should be sorted by product_id
.
Please sign-in to view the solution
You are tasked with analyzing sales data for a retail company using SQL and Power BI. The dataset includes tables for sales transactions, products, and customer information. The goal is to create a comprehensive report that provides insights into sales trends, customer segmentation, and product performance.
Data Extraction and Preparation: Outline the SQL queries you would use to extract relevant data from the sales database. Include how you would join tables to gather information on sales transactions, product details, and customer demographics.
Data Analysis in Power BI: Describe the steps you would take in Power BI to visualize and analyze the extracted data. Include the types of visualizations you would create to showcase sales trends over time, customer purchasing behavior, and regional sales performance.
Insights and Recommendations: Based on your analysis, identify key insights such as top-selling products, customer segments with high purchase frequency, and regions with potential growth opportunities. Provide recommendations on strategies to improve sales and customer engagement based on your findings.
Please sign-in to view the solution
You are developing a class hierarchy in Python for a financial application. You have a superclass called Transaction
with a method process()
. You have a subclass called InternationalTransaction
that extends Transaction
. Override the process()
method in InternationalTransaction
to perform additional processing but ensure that it still calls the process()
method from Transaction
.
Please sign-in to view the solution
You are building a web application and need to select all HTML elements that have a specific data attribute using jQuery. Specifically, select all elements with the data attribute data-status
equal to active
and apply a CSS class highlight
to them.
Please sign-in to view the solution
You are required to automate the submission of a web form using Selenium WebDriver in Python. The form has the following fields:
- Text input field with
id="username"
- Password input field with
id="password"
- Submit button with
id="submit"
Write a Python script using Selenium to fill out the form and submit it, handling potential delays in the page load using WebDriverWait.
Please sign-in to view the solution
Describe the difference between JDK (Java Development Kit) and JRE (Java Runtime Environment). Provide a brief explanation of each and explain when you would use one over the other.
Please sign-in to view the solution
Write a code snippet in Python to handle pop-up windows using Selenium WebDriver. The code should demonstrate how to switch to the pop-up, perform an action such as accepting or dismissing it, and then switch back to the main window.
Please sign-in to view the solution
Define Regression Testing and explain its importance in the software testing lifecycle. Provide examples of when and why it should be conducted.
Please sign-in to view the solution
Describe the method to check if there is a loop in a linked list. Provide the algorithm and example code in Python.
Please sign-in to view the solution
You are working on a Python project with several modules and packages. Over time, some modules may become obsolete and unused. How would you identify all the unused modules in the project?
Please sign-in to view the solution
Explain two ways to create and start threads in Java. Provide a brief explanation and example code for each method.
Please sign-in to view the solution
Explain how exceptions are handled in Java. Provide a brief explanation of the different types of exceptions and include example code demonstrating the use of try
, catch
, and finally
blocks.
Please sign-in to view the solution
Write a program in Python to reverse a given string. The program should take a string as input and return the reversed string as output.
Please sign-in to view the solution
Define Exploratory Testing and explain its importance in the software testing lifecycle. Provide examples of when and how it can be effectively used.
Please sign-in to view the solution
Define Integration Testing and explain its importance in the software development lifecycle. Describe the different approaches to integration testing and provide examples of when and why it should be conducted.
Please sign-in to view the solution
Explain the core Object-Oriented Programming (OOP) methods. Provide definitions and examples for each of the primary methods: encapsulation, inheritance, polymorphism, and abstraction.
Please sign-in to view the solution
Discuss the importance of performance testing, tools commonly used for performance testing, and your experience in automation testing.
Please sign-in to view the solution
Describe what the burn-in process is, its importance, and how it is typically conducted. Include examples of where burn-in testing is used and the benefits it provides.
Please sign-in to view the solution
Define Security Testing and explain its importance in the software development lifecycle. Describe the common types of security testing and provide examples of techniques and tools used in security testing.
Please sign-in to view the solution
Explain the difference between severity and priority in the context of software testing. Provide examples of test cases where you might have high priority and low severity, and low priority and high severity.
Please sign-in to view the solution