Amdocs
300+ Interview Questions and Answers
You are given a string A consisting of lower case English letters. You have to find the first non-repeating character from each stream of characters.
For Example: If the given ...read more
If I give you $ tablets which contain 2 for fever and 2 for cold given all 4 have same size shape and color and
you have to take 1 cold and 1 fever tablet how will you choose correctly?
Given an array/list 'ARR' of ‘N’ distinct integers, you are supposed to find the third largest element in the given array 'ARR'.
Input Format :
The first line contains a single integer ‘T’...read more
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 present in the string. If there are no unique c...read more
You have given a Singly Linked List of integers, determine if it forms a cycle or not.
A cycle occurs when a node's next points back to a previous node in the list. The li...read more
You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.
An array is said to have a pythagorean triplet if there exists thre...read more
Nth term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -
F(n) = F(n-1) + F(n-2), Where, F(1) = F(2) = 1
Provided N you have to find out the ...read more
Ans 1) Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me unique from others.
Ans 2) a) It is a semi -product based compa...read more
Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.
Example :
Merge Sort Algorithm - Merge sort is a Div...read more
You are given a string ‘S’. Your task is to return all distinct palindromic substrings of the given string in alphabetical order.
A string is said to be palindrome if the reverse of the st...read more
Pre-requisites: Anagrams are defined as words or names that can be formed by rearranging letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "r...read more
Given a singly linked list of integers. Your task is to return the head of the reversed linked list.
For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked lis...read more
You are given an array/list 'ARR' consisting of N integers, which contains elements only in the range 0 to N - 1. Some of the elements may be repeated in 'ARR'. Your task is to find all ...read more
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 length K.
Note:
1. The array may contain...read more
There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find out their relative speed. At no point you can find out the actual...read more
Q16. 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
You are given an undirected, connected and weighted graph G(V, E), consisting of V number of vertices (numbered from 0 to V-1) and E number of edges.
Find and print the total weight of the ...read more
You are given a 2-D plane, and some 'N' integer coordinates in the form of (X, Y), where 'X' is the x-coordinate and 'Y' is the y-coordinate, all of which lie on that plane. You n...read more
Table my_numbers contains many numbers in column num including duplicated ones. Can you write a SQL query to find the biggest number, which only appears once.
I had 2 integers which I had to multiply with each other and had to store the result in an integer only by handling the overflow condition.
Given a string ‘STR’ consisting of lower case English letters, the task is to find the first non-repeating character in the string and return it. If it doesn’t exist, return ‘#...read more
Given a string ‘STR’ of length 'N'. Implement the atoi function. If there are no numbers in the string, return 0.
In other words, given a string ‘STR’ convert the string to an integer.
Ex...read more
You have been given an array/list ARR of length N consisting of 0s and 1s only. Your task is to find the number of subarrays(non-empty) in which the number of 0s and 1s are equal....read more
Reverse a given stack of integers using recursion.
Note:
You are not allowed to use any extra space other than the internal stack space used due to recursion. You are not allowed to...read more
You are given a string 'S'. Your task is to check whether the string is palindrome or not. For checking palindrome, consider alphabets and numbers only and ignore the symbols ...read more
You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.
An array is said to have a pythagorean triplet if there exists thr...read more
You have been given a singly Linked List of 'N' nodes with integer data and an integer 'K'. Your task is to remove the Kth node from the end of the given Linked List.
For example:
The gi...read more
You are given ‘N’ types of umbrellas, where each umbrella can shelter some number of people. Given the number of people each umbrella can shelter in the array “UMBRELLA”, you need to determine the minim...read more
You are given an integer, all you have to do is to find whether this number is a Fibonacci number or not.
Fn is said to be a Fibonacci sequence such that each number in Fn is the sum of its two ...read more
1) Write command in the terminal to check the kernel version .
2) Check the system hardware in Linux .
3) What are the contents of /etc
How to Take a Backup of a Table in MySQL?
You are given a binary tree in which each node contains an integer value and a number ‘K’. Your task is to print every path of the binary tree with the sum of nodes in the path as ‘...read more
Given an integer N, print all the prime numbers that lie in the range 2 to N (both inclusive).
Print the prime numbers in different lines.
Input Format :
Integer N
Output Format :
Prime numbe...read more
What is Serialization and Deserialization in Java ?
Check whether there exists a loop in the linked list or not.
You are given two Singly Linked List of integers, which are merging at some node of a third linked list.
Your task is to find the data of the node at which merging starts. If there is...read more
What is the difference between Overloading and Overriding?
You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more
What is Pure Virtual function? Why we need it?
Q40. 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; } }
Q41. 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
Ninja is given a task to implement a priority queue using Heap data structure. The Ninja is busying preparing for the tournament., So he asked for your help.
Your task is to use the c...read more
You are given an array consisting of 'N' positive integers where each integer is either 0 or 1 or 2. Your task is to sort the given array in non-decreasing order.
Note :
1. The array consists of only ...read more
You are given two sorted linked lists. You have to merge them to produce a combined sorted linked list. You need to return the head of the final linked list.
Note:
The given linked ...read more
Take two numbers as input and swap them and print the swapped values.
Input Format:
The first line of input contains a single integer 't', representing the total number of test cases. The second...read more
Q47. 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
Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:
1. get(key) - Return the value of the key if the key exists in the cache, o...read more
Q49. 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
Difference between the DELETE and TRUNCATE command in a DBMS.
Difference between Constructor and Method?
Q53. 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
Print 1 to 100 using more than two threads.
Explain SOLID principles in Object Oriented Design .
Q56. 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.
20 MCQ's were based on Java, C++, Linux, Operating systems, Database Management System.
Q58. 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
Q59. 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.
Q60. 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.
What do chmod, chown, chgrp commands do?
Q62. 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.
Q63. 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
Q64. 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
What is a friend function in C++?
Q66. 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.
Q67. 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
Q68. 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
Q69. 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.
Q70. 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
What is meant by normalization and denormalization?
Measure 4L using 3L and 5L cans .
Q75. 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.
Q76. 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
Q77. 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
Q78. 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
Write a query that joins two tables A and B having common attribute ID and selects records(ID_NAME) that have matching ID values in both tables .
Q80. 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
Q81. 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
What are the features of HTML-5?
Q83. 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
Q84. 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.
What is indexing?
What are different types of datatype in js?
How do you modify the linux file permission?
Q86. 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
Explain any 5 essential UNIX commands .
Q88. 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
Q89. 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';
Why Java is platform independent and JVM platform dependent?
What is Static variable in C ?
Q92. 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
Q93. 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
Q94. 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.
Explain Run Time Polymorphism in C++.
Explain Left Outer Join and Right Outer Join .
Q97. 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
Q98. 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
Q99. 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
Q100. 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
Top HR Questions asked in null
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month