Amdocs
400+ Endurance Technologies Interview Questions and Answers
Q1. First Unique Character in a Stream Problem Statement
Given a string A
consisting of lowercase English letters, determine the first non-repeating character at each point in the stream of characters.
Example:
Inp...read more
Q2. Find the Third Greatest Element
Given an array 'ARR' of 'N' distinct integers, determine the third largest element in the array.
Input:
The first line contains a single integer 'T' representing the number of te...read more
Q3. Find First Unique Character in a String
You are given a string S
of length N
. Your task is to find the index (considering 1-based indexing) of the first unique character in the string. If there are no unique ch...read more
Q4. Cycle Detection in a Singly Linked List
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the list. T...read more
Q5. Pythagorean Triplet Problem
Determine if there exists a Pythagorean triplet within a given array of integers. A Pythagorean triplet consists of three numbers, x, y, and z, such that x^2 + y^2 = z^2.
Explanation...read more
Q6. Nth Fibonacci Number Problem Statement
Calculate the Nth term in the Fibonacci sequence, where the sequence is defined as follows: F(n) = F(n-1) + F(n-2)
, with initial conditions F(1) = F(2) = 1
.
Input:
The inp...read more
Q7. Merge Sort Problem Statement
You are given a sequence of numbers, ARR
. Your task is to return a sorted sequence of ARR
in non-descending order using the Merge Sort algorithm.
Explanation:
The Merge Sort algorit...read more
Q8. Palindromic Substrings Problem Statement
Given a string S
, your task is to return all distinct palindromic substrings of the given string in alphabetical order.
Explanation:
A string is considered a palindrome ...read more
Q9. Anagram Pairs Verification Problem
Your task is to determine if two given strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the other...read more
Q10. Reverse Linked List Problem Statement
Given a singly linked list of integers, return the head of the reversed linked list.
Example:
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed linked list: 4 -> 3 -> 2...read more
Q11. Find Duplicates in an Array
Given an array ARR
of size 'N', where each integer is in the range from 0 to N - 1, identify all elements that appear more than once.
Return the duplicate elements in any order. If n...read more
Q12. Maximum Sum Increasing Subsequence of Length K Problem Statement
You are given an array NUMS
consisting of N integers and an integer K. Your task is to determine the maximum sum of an increasing subsequence of ...read more
Q13. Puzzle:- you have two jars 3L and 5L and unlimited supply of water. How will you calculate 4L of water.
To measure 4L of water using 3L and 5L jars, fill the 5L jar, pour 3L into the 3L jar, empty the 3L jar, and pour the remaining 2L from the 5L jar into the 3L jar. Finally, fill the 5L jar again and pour 1L into the 3L jar. Now, the 5L jar contains 4L of water.
Fill the 5L jar completely
Pour 3L from the 5L jar into the 3L jar
Empty the 3L jar
Pour the remaining 2L from the 5L jar into the 3L jar
Fill the 5L jar again
Pour 1L from the 5L jar into the 3L jar
Q14. Minimum Spanning Tree Problem Statement
You are provided with an undirected, connected, and weighted graph G(V, E). The graph comprises V vertices (numbered from 0 to V-1) and E edges.
Determine and return the ...read more
Q15. Maximum Points On Straight Line Problem Statement
You are provided with a 2-D plane and a set of integer coordinates. Your task is to determine the maximum number of these coordinates that can be aligned in a s...read more
Q17. First Unique Character in a String Problem Statement
Given a string STR
consisting of lowercase English letters, identify the first non-repeating character in the string and return it. If no such character exis...read more
Q18. Implement Atoi Function
You have a string 'STR' of length 'N'. Your task is to implement the atoi function, which converts the string into an integer. If the string does not contain any numbers, the function sh...read more
Q19. Subarray with Equal Occurrences Problem Statement
You are provided with an array/list ARR
of length N
containing only 0s and 1s. Your goal is to determine the number of non-empty subarrays where the number of 0...read more
Q20. Reverse Stack with Recursion
Reverse a given stack of integers using recursion. You must accomplish this without utilizing extra space beyond the internal stack space used by recursion. Additionally, you must r...read more
Q21. Palindrome String Validation
Determine if a given string 'S' is a palindrome, considering only alphanumeric characters and ignoring spaces and symbols.
Note:
The string 'S' should be evaluated in a case-insensi...read more
Q22. Pythagorean Triplets Detection
Determine if an array contains a Pythagorean triplet by checking whether there are three integers x, y, and z such that x2 + y2 = z2 within the array.
Input:
The first line contai...read more
Q23. Remove the Kth Node from the End of a Linked List
You are given a singly Linked List with 'N' nodes containing integer data and an integer 'K'. Your task is to delete the Kth node from the end of this Linked Li...read more
Q24. Minimum Umbrellas Problem
You are provided with ‘N’ types of umbrellas, where each umbrella type can shelter a certain number of people. Given an array UMBRELLA
that indicates the number of people each umbrella...read more
Q25. Fibonacci Number Verification
Identify if the provided integer 'N' is a Fibonacci number.
A number is termed as a Fibonacci number if it appears in the Fibonacci sequence, where each number is the sum of the tw...read more
Q27. K - Sum Path In A Binary Tree
Given a binary tree where each node contains an integer value, and a value 'K', your task is to find all the paths in the binary tree such that the sum of the node values in each p...read more
Q28. All Prime Numbers Problem Statement
Given an integer 'N', your task is to print all the prime numbers that lie within the range from 2 to 'N' (inclusive).
Input:
Integer N
Output:
Prime numbers printed on separ...read more
Q31. Intersection of Linked List Problem
You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.
Your task is to determine the data...read more
Q33. Ways To Make Coin Change
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make the c...read more
Q34. What is singleton calss?Write a program to make a class singleton?
Singleton class is a class that can only have one instance at a time.
It is used to control access to a shared resource or limit the instantiation of a class to one object.
To make a class singleton, make the constructor private and provide a static method to get the instance.
Example: public class Singleton { private static Singleton instance = new Singleton(); private Singleton() {} public static Singleton getInstance() { return instance; } }
Q35. Challenges faced in your RPA experience and how you resolved it?
Challenges faced in RPA experience and how resolved
One challenge was automating a process with multiple decision points, resolved by creating a decision tree
Another challenge was handling exceptions, resolved by implementing exception handling mechanisms
Integration with legacy systems was a challenge, resolved by creating custom connectors
Lack of standardization in input data was a challenge, resolved by implementing data validation and cleansing mechanisms
Q36. Nth Fibonacci Number Problem
Calculate the Nth term in the Fibonacci sequence using the formula: F(n) = F(n-1) + F(n-2)
where F(1) = F(2) = 1
.
Given a number N, determine the Nth Fibonacci number.
Input:
N
Outp...read more
Q37. Priority Queue Implementation
Ninja is tasked with implementing a priority queue using the Heap data structure. Since Ninja is busy with tournament preparations, your help is requested to complete this task.
Pr...read more
Q38. Sort Array Problem Statement
Given an array consisting of 'N' positive integers where each integer is either 0, 1, or 2, your task is to sort the given array in non-decreasing order.
Input:
Each input starts wi...read more
Q39. Merge Two Sorted Linked Lists Problem Statement
You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.
Input:...read more
Q40. Swap Two Numbers Problem Statement
Given two integers a
and b
, your task is to swap these numbers and output the swapped values.
Input:
The first line contains a single integer 't', representing the number of t...read more
Q42. What is vptr and vptr table? how many instances of them are created and when?
vptr stands for virtual pointer and vptr table is a table of function pointers used in polymorphism in C++.
vptr is a hidden member variable in C++ objects that points to the vptr table.
vptr table is a table of function pointers that maps virtual functions to their addresses.
Each object of a class with virtual functions has its own vptr and shares the same vptr table with other objects of the same class.
vptr and vptr table are created when an object of a class with virtual fun...read more
Q43. LRU Cache Design Question
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherwise, re...read more
Q44. What is serialization and Deserialization?write a program
Serialization is the process of converting an object into a stream of bytes, while deserialization is the reverse process.
Serialization is used for data storage, transmission, and object persistence.
Deserialization is used to recreate the original object from the serialized data.
Examples of serialization formats include JSON, XML, and binary formats like Protocol Buffers and Apache Avro.
Serialization can also be used for deep copying objects.
Deserialization can be vulnerable ...read more
Q47. Write a program to find duplicate elements in arraylist by min number of iterations?
Program to find duplicate elements in arraylist with minimum iterations
Use HashSet to store unique elements and ArrayList to store duplicates
Iterate through the ArrayList only once
Use contains() method to check if element is already in HashSet
Q49. You have been given 9 balsa of same shape and size by using weighing scale you need to determine the heavy weight ball by weighing 3 times.
Weigh 3 groups of 3 balls each, then weigh 2 heaviest balls from the heaviest group to find the heaviest ball.
Divide the 9 balls into 3 groups of 3 balls each.
Weigh the first 2 groups against each other.
If one group is heavier, weigh 2 balls from that group against each other to find the heaviest ball.
If both groups weigh the same, weigh the third group to find the heaviest group.
Weigh 2 heaviest balls from the heaviest group to find the heaviest ball.
Q52. Coding- String reversal and separation of vowel and consonants Swap two variables without using 3rd variable Pattern printing
Answering coding questions on string reversal, variable swapping, and pattern printing.
For string reversal, use a loop to iterate through the string and append each character to a new string in reverse order.
To separate vowels and consonants, use a loop to iterate through the string and check if each character is a vowel or consonant.
To swap two variables without a third variable, use arithmetic operations or XOR bitwise operator.
For pattern printing, use nested loops to prin...read more
Q53. Why we use const reference in copy constructor?
Const reference in copy constructor is used to avoid unnecessary object copying and improve performance.
Const reference allows us to pass objects by reference without modifying them.
Using const reference in copy constructor avoids creating a temporary copy of the object being passed.
It helps in preventing unnecessary memory allocation and improves performance.
Const reference ensures that the original object is not modified during the copy construction process.
Q54. write a program to display pattern. output - 1 12 123 1234
Program to display a pattern of numbers in a pyramid shape.
Use nested loops to print the numbers in the desired pattern.
The outer loop controls the number of rows and the inner loop prints the numbers in each row.
Use a variable to keep track of the number to be printed in each row.
Print a new line after each row is printed.
Q55. swaping of number using call by value , address and reference
Swapping of numbers can be done using call by value, address and reference.
Call by value: Pass the values of variables as arguments to the function. Swap the values inside the function.
Call by address: Pass the addresses of variables as arguments to the function. Swap the values using pointers inside the function.
Call by reference: Pass the references of variables as arguments to the function. Swap the values using references inside the function.
Q56. How to convert a string containing a number into integer without using inbuilt function?
Convert string to integer without using inbuilt function
Iterate through each character and multiply by 10 and add the integer value of the character
Use ASCII values to convert character to integer
Handle negative numbers separately
Q57. What is right outer join and it's use in real world scenario
Right outer join is a type of join operation that returns all the rows from the right table and the matching rows from the left table.
Right outer join is denoted by the RIGHT JOIN keyword in SQL.
It is used to combine rows from two tables based on a related column.
In the result set, unmatched rows from the right table will have NULL values for the columns of the left table.
A real-world scenario for using a right outer join is when analyzing customer data and sales data. The ri...read more
Q59. whats are the diffrent position properties of css ?
CSS position properties are used to position elements on a web page.
The position property specifies the type of positioning method used for an element.
The top, bottom, left, and right properties are used to position the element.
The static, relative, absolute, fixed, and sticky values are used for the position property.
Static is the default value and elements are positioned according to the normal flow of the page.
Relative positions the element relative to its normal position....read more
Q60. how to create Back Up table in mysql?
To create a backup table in MySQL, use the CREATE TABLE statement with SELECT INTO.
Use the CREATE TABLE statement with SELECT INTO to create a backup table.
Specify the name of the backup table and the name of the original table.
Use the SELECT INTO statement to copy the data from the original table to the backup table.
Example: CREATE TABLE backup_table SELECT * FROM original_table;
Make sure to regularly update the backup table to ensure data consistency.
Q61. Explain 4 words of OOPs. Encapsulation, Inheritance,Abstraction,Polymorphism
OOPs concepts include Encapsulation, Inheritance, Abstraction, and Polymorphism.
Encapsulation: bundling of data and methods that operate on that data
Inheritance: creating new classes from existing ones
Abstraction: hiding implementation details and showing only necessary information
Polymorphism: ability of objects to take on multiple forms or behaviors
Q62. What are the key concepts of Object-Oriented Programming (OOP)?
Key concepts of OOP include encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object).
Inheritance: Allowing a class to inherit properties and behavior from another class.
Polymorphism: Objects of different classes can be treated as objects of a common superclass.
Abstraction: Hiding complex implementation details and showing only the necessary features to the outside world.
Q63. What is the internal working mechanism of a HashMap?
HashMap is a data structure that stores key-value pairs and uses hashing to quickly retrieve values based on keys.
HashMap internally uses an array of linked lists to store key-value pairs.
When a key-value pair is added, the key is hashed to determine the index in the array where the pair will be stored.
If multiple keys hash to the same index (collision), a linked list is used to store these pairs.
To retrieve a value, the key is hashed again to find the index and then the link...read more
Q67. write multi-threading program to print 1 2 1 2 using 2 thread.
A multi-threading program to print 1 2 1 2 using 2 threads.
Create two threads and pass a flag to each thread to print either 1 or 2.
Use a synchronization mechanism like mutex or semaphore to ensure alternate printing.
Join the threads to wait for their completion.
Q69. What is multithreading and POSIX thread and its synchronisation .
Multithreading is the ability of a CPU to execute multiple threads concurrently. POSIX thread is a standard for thread creation and management.
Multithreading allows multiple threads to run concurrently, improving performance and responsiveness.
POSIX thread (pthread) is a standard for creating and managing threads in Unix-based systems.
Thread synchronization is the coordination of threads to ensure that they do not interfere with each other's execution.
Mutexes, semaphores, and...read more
Q70. What is sdlc stlc waterfall model,smoke testing, black box testing, what is quality, what is strub and driver, different levels of testing, UAT, system testing. What is defect, Defect life cycle.
SDLC, STLC, Waterfall model, smoke testing, black box testing, quality, stub and driver, levels of testing, UAT, system testing, defect, defect life cycle.
SDLC (Software Development Life Cycle) is a process followed for software development.
STLC (Software Testing Life Cycle) is a process followed for software testing.
Waterfall model is a linear sequential approach to software development.
Smoke testing is a preliminary test to check if the software is stable enough for further...read more
Q71. what is Garbage collector in java?
Garbage collector in Java is an automatic memory management system that frees up memory by removing unused objects.
Garbage collector runs in the background and identifies objects that are no longer in use
It frees up memory by removing those unused objects
It helps prevent memory leaks and improves performance
Java provides different types of garbage collectors such as Serial, Parallel, CMS, and G1
Example: If an object is created but not used anymore, the garbage collector will ...read more
Q73. Given a circular cake and a specified number of straight cuts, what is the maximum number of pieces into which the cake can be divided?
The maximum number of pieces a circular cake can be divided into with a specified number of straight cuts.
Each cut will increase the number of pieces by 1
The formula to calculate the maximum number of pieces is n(n+1)/2 + 1, where n is the number of cuts
For example, with 3 cuts, the maximum number of pieces is 7: 3(3+1)/2 + 1 = 7
Q74. What is volatile keyword and its Real time use
Volatile keyword is used to indicate that a variable's value can be changed unexpectedly.
It is used in multi-threaded programming to ensure that the value of a variable is always up-to-date and consistent across all threads.
It prevents the compiler from optimizing code that accesses the variable, ensuring that the variable is always read from memory and not from a cache.
Examples include hardware registers, shared memory, and global variables that can be accessed by multiple t...read more
Q75. 1)How to run failed test case: using failed.xml 2)how to use click in diff ways: by actions class click and by javascriptexecuter 3)array logical program *array reverse *array sec highest number 1 12 123 1234 1...
read moreInterview questions for Automation Test Engineer
To run failed test case, use failed.xml
Click can be used via Actions class or JavascriptExecutor
Array programs: reverse, second highest number
Constructor in abstract class
Test plan and scenario definition
Roles and responsibilities in current organization
Disable test cases using keyword or include/exclude in suite
Polymorphism concept
Unix commands used in day to day activity
TestNG annotations and keywords
Code for scroll up and dow...read more
Q77. write a program to reverse the string any language
Program to reverse a string in any language
Create an empty string variable to store the reversed string
Loop through the original string from the end to the beginning
Append each character to the empty string variable
Return the reversed string
Q78. Tell me about different types of joins in SQL
Different types of joins in SQL include inner join, left join, right join, and full outer join.
Inner join: Returns rows when there is a match in both tables.
Left join: Returns all rows from the left table and the matched rows from the right table.
Right join: Returns all rows from the right table and the matched rows from the left table.
Full outer join: Returns rows when there is a match in either table.
Q79. What is interfaces and demonstrate by example
Interfaces in software development define a contract for classes to implement certain methods or properties.
Interfaces in programming are like blueprints that define the structure of a class.
Classes that implement an interface must provide definitions for all the methods and properties specified in the interface.
Interfaces allow for polymorphism and code reusability.
Example: An interface 'Shape' may have methods like 'calculateArea' and 'calculatePerimeter', which classes lik...read more
Q80. Which is a best technique to generate automated test report ?
The best technique to generate automated test report is to use a reporting tool that integrates with the automation framework.
Choose a reporting tool that supports the programming language and automation framework being used
Configure the reporting tool to generate reports in the desired format
Include relevant information in the report such as test case name, status, and duration
Add screenshots or videos to the report to provide additional context
Schedule the report to be gene...read more
Q82. What is recursion?Explain it graphically?How compiler executed recursion?
Recursion is a process in which a function calls itself repeatedly until a base condition is met.
Recursion involves breaking down a problem into smaller subproblems and solving them recursively.
It uses a stack to keep track of function calls and their parameters.
Examples include factorial, Fibonacci sequence, and binary search.
Compiler executes recursion by allocating memory for each function call and storing the return address and local variables on the stack.
It then pops th...read more
Q83. What is views in sql?
Views in SQL are virtual tables that display data from one or more tables.
Views are created using SELECT statements.
They can be used to simplify complex queries.
They can also be used to restrict access to sensitive data.
Views do not store data themselves, but rather display data from other tables.
Example: CREATE VIEW myView AS SELECT * FROM myTable WHERE column = 'value';
Q86. PLSQL= 1.What is cursor &types 2. Diff btw primay key &unique key. 3.triggers & its type. 4. View &its types. 4.bulk collection. 5.what is dynamic query & how to implement.
Answers to questions related to PL/SQL concepts like cursor, primary key, unique key, triggers, views, bulk collection, and dynamic queries.
A cursor is a pointer to a private SQL area that stores information about the processing of a SELECT or DML statement
Primary key uniquely identifies each record in a table, while a unique key ensures that all values in a column are distinct
Triggers are stored programs that are fired automatically in response to specific events or changes ...read more
Q87. Differentiate between null pointer and, dangling pointer
Null pointer points to nothing, while dangling pointer points to memory that has been deallocated.
Null pointer is a pointer that does not point to any memory location.
Dangling pointer is a pointer that points to memory that has been deallocated.
Accessing a null pointer will result in a segmentation fault.
Accessing a dangling pointer can lead to unpredictable behavior or crashes.
Example: int* nullPtr = nullptr; int* danglingPtr = new int; delete danglingPtr; danglingPtr = null...read more
Q88. What would be your Expected CTC?
My expected CTC would depend on the job role, company size, location, and benefits package.
Consider the job role and responsibilities when determining expected CTC.
Research industry standards and average salaries for similar positions.
Factor in the company size and location, as cost of living varies.
Take into account additional benefits such as healthcare, retirement plans, and bonuses.
Be prepared to negotiate based on your skills, experience, and market demand.
Q89. Difference between constructor and method?
Constructor is used to initialize an object while method is used to perform an action on an object.
Constructor is called automatically when an object is created while method is called explicitly.
Constructor has the same name as the class while method has a unique name.
Constructor does not have a return type while method has a return type.
Example of constructor: public class Car { public Car() { //initialize variables } }
Example of method: public void startEngine() { //perform...read more
Q92. Program for reverse of string in minimum iteration
Program to reverse a string in minimum iteration
Use two pointers, one at the start and one at the end of the string
Swap the characters at the two pointers and move the pointers towards each other
Repeat until the pointers meet in the middle of the string
Q93. if 4 represent as $** and 3 represent as *$$ based on it there were 4 questions....like i) what is the value of $$$** + $**$* in similar way rest of 3 questions
Q94. What is python and constructer ,arrays,data structures
Python is a high-level programming language known for its simplicity and readability. Constructors are special methods used to initialize objects in classes.
Python is a versatile programming language used for web development, data analysis, artificial intelligence, and more.
Constructors in Python are special methods with the __init__() function that initialize objects when they are created.
Arrays in Python are data structures that can hold multiple values of the same type. Th...read more
Q96. Swap two character variables without using third
Swapping two character variables without using third
Use XOR operator to swap two variables without using third variable
Assign the XOR of both variables to the first variable
Assign the XOR of the first variable and second variable to the second variable
Q97. What is process and its synchronisation
Process is a program in execution. Synchronization is the coordination of multiple processes or threads.
Process is a program in execution that has its own memory space and resources.
Synchronization is the coordination of multiple processes or threads to ensure they do not interfere with each other.
Synchronization can be achieved through various mechanisms such as locks, semaphores, and monitors.
Examples of synchronization include ensuring only one thread accesses a shared res...read more
Q98. Write any program of recursion and explain it using stack frames?
A program demonstrating recursion using factorial function.
Recursion is a technique where a function calls itself.
Factorial function is a classic example of recursion.
Each recursive call creates a new stack frame.
The base case is when the input is 1, and the function returns 1.
The final result is the product of all the recursive calls.
Example: factorial(5) = 5 * factorial(4) = 5 * 4 * factorial(3) = ... = 5 * 4 * 3 * 2 * 1 = 120.
Top HR Questions asked in Endurance Technologies
Interview Process at Endurance Technologies
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month