i
Cognizant
Filter interviews by
Sort words in a string in lexicographical order, arranging them from A to Z.
Split the string into words using space as a delimiter. Example: 'apple banana cherry' -> ['apple', 'banana', 'cherry']
Use a sorting function to arrange the words. Example: sorted(['apple', 'banana', 'cherry']) -> ['apple', 'banana', 'cherry']
Join the sorted words back into a single string. Example: ' '.join(['apple', 'banana', 'cher...
Use a HashMap to store keys and values, then transfer them to two ArrayLists for further processing.
Create a HashMap to store key-value pairs: HashMap<String, String> map = new HashMap<>();
Add entries to the HashMap: map.put('key1', 'value1');
Initialize two ArrayLists: ArrayList<String> keysList = new ArrayList<>(); ArrayList<String> valuesList = new ArrayList<>();
Iterate throug...
Sort program for a list of strings
Use a sorting algorithm like bubble sort, selection sort, or quicksort
Compare adjacent elements and swap them if they are in the wrong order
Repeat this process until the list is sorted
XPath for search in Google
Use the input element with name attribute 'q' for the search box
XPath: //input[@name='q']
Use the button element with name attribute 'btnK' for the search button
XPath: //input[@name='btnK']
What people are saying about Cognizant
Handling multiple windows in Selenium can be achieved using window handles.
Use getWindowHandles() method to get all window handles
Switch between windows using switchTo().window() method
Perform actions on each window as needed
throw is used to throw an exception in Java, while throws is used to declare an exception that a method might throw.
throw is used to explicitly throw an exception within a method.
throws is used in the method signature to declare that the method might throw a specific type of exception.
Example: throw new Exception("An error occurred!");
Example: public void method() throws IOException {}
204 and 400 are HTTP response codes in REST APIs indicating success and client error, respectively.
204 response code indicates that the server has successfully fulfilled the request and there is no content to send in the response.
400 response code indicates that the server could not understand the request due to bad syntax or missing required parameters.
Example: If a client sends a request to update a resource and...
Count the number of upper case and lower case letters in a string using coding.
Iterate through each character in the string and check if it is upper case or lower case using built-in functions or ASCII values.
Keep track of the count of upper case and lower case letters separately.
Return the counts of upper case and lower case letters.
A framework is a set of guidelines, tools, and libraries that provide structure and support for developing software applications.
A framework provides a foundation for building software applications by defining the structure, flow, and behavior of the application.
It includes pre-defined functions, classes, and modules that can be used to simplify and accelerate development.
Frameworks often follow a specific archite...
Patch release is a set of changes to fix bugs or improve functionality, hot fix is an urgent update to address critical issues, and cold fix is a planned update for non-urgent issues.
Patch release is a scheduled update that includes multiple fixes and improvements.
Hot fix is an immediate update to address critical issues that cannot wait for the next patch release.
Cold fix is a planned update for non-urgent issues...
I applied via Naukri.com and was interviewed in Nov 2024. There were 2 interview rounds.
I am a highly skilled Automation Engineer with a strong background in programming and problem-solving.
Experienced in developing automated test scripts using tools like Selenium and Appium
Proficient in programming languages such as Java, Python, and C#
Familiar with CI/CD pipelines and version control systems like Git
Strong analytical skills and attention to detail
Excellent communication and teamwork abilities
I am a highly skilled Automation Engineer with a strong background in programming and problem-solving.
Experienced in designing, developing, and implementing automated testing solutions
Proficient in programming languages such as Python, Java, and C++
Familiar with various automation tools like Selenium and Jenkins
Strong analytical skills and attention to detail
Excellent communication and teamwork abilities
I applied via Recruitment Consulltant and was interviewed in Sep 2024. There was 1 interview round.
Sort program for a list of strings
Use a sorting algorithm like bubble sort, selection sort, or quicksort
Compare adjacent elements and swap them if they are in the wrong order
Repeat this process until the list is sorted
XPath for search in Google
Use the input element with name attribute 'q' for the search box
XPath: //input[@name='q']
Use the button element with name attribute 'btnK' for the search button
XPath: //input[@name='btnK']
I appeared for an interview in Mar 2025, where I was asked the following questions.
Use a HashMap to store keys and values, then transfer them to two ArrayLists for further processing.
Create a HashMap to store key-value pairs: HashMap<String, String> map = new HashMap<>();
Add entries to the HashMap: map.put('key1', 'value1');
Initialize two ArrayLists: ArrayList<String> keysList = new ArrayList<>(); ArrayList<String> valuesList = new ArrayList<>();
Iterate through the...
Sort words in a string in lexicographical order, arranging them from A to Z.
Split the string into words using space as a delimiter. Example: 'apple banana cherry' -> ['apple', 'banana', 'cherry']
Use a sorting function to arrange the words. Example: sorted(['apple', 'banana', 'cherry']) -> ['apple', 'banana', 'cherry']
Join the sorted words back into a single string. Example: ' '.join(['apple', 'banana', 'cherry'])...
I applied via Recruitment Consulltant and was interviewed in Apr 2024. There was 1 interview round.
throw is used to throw an exception in Java, while throws is used to declare an exception that a method might throw.
throw is used to explicitly throw an exception within a method.
throws is used in the method signature to declare that the method might throw a specific type of exception.
Example: throw new Exception("An error occurred!");
Example: public void method() throws IOException {}
Handling multiple windows in Selenium can be achieved using window handles.
Use getWindowHandles() method to get all window handles
Switch between windows using switchTo().window() method
Perform actions on each window as needed
204 and 400 are HTTP response codes in REST APIs indicating success and client error, respectively.
204 response code indicates that the server has successfully fulfilled the request and there is no content to send in the response.
400 response code indicates that the server could not understand the request due to bad syntax or missing required parameters.
Example: If a client sends a request to update a resource and the ...
Count the number of upper case and lower case letters in a string using coding.
Iterate through each character in the string and check if it is upper case or lower case using built-in functions or ASCII values.
Keep track of the count of upper case and lower case letters separately.
Return the counts of upper case and lower case letters.
Programs for fibonacci
Application live scenario
I applied via Naukri.com and was interviewed in Oct 2023. There were 2 interview rounds.
Logical Java, and Manual Testing
Patch release is a set of changes to fix bugs or improve functionality, hot fix is an urgent update to address critical issues, and cold fix is a planned update for non-urgent issues.
Patch release is a scheduled update that includes multiple fixes and improvements.
Hot fix is an immediate update to address critical issues that cannot wait for the next patch release.
Cold fix is a planned update for non-urgent issues that...
I applied via Campus Placement and was interviewed in Jan 2022. There were 4 interview rounds.
Maths speed/ratio/time/profit and loss.
The question were from reasoning and arithmetical and logical section. One can use basic go through of aptitude.
The question was about find the occurrence of a word in a sentence. I used array to solve that in c++ language.
SQL query for intermediate level
Use SELECT statement to retrieve data from tables
Use WHERE clause to filter data based on conditions
Use JOIN to combine data from multiple tables
Use GROUP BY to group data based on a column
Use ORDER BY to sort data based on a column
based on 12 interview experiences
Difficulty level
Duration
based on 33 reviews
Rating in categories
Associate
73.1k
salaries
| ₹5.3 L/yr - ₹12.5 L/yr |
Programmer Analyst
56.2k
salaries
| ₹3.5 L/yr - ₹7.3 L/yr |
Senior Associate
53k
salaries
| ₹10.6 L/yr - ₹23.4 L/yr |
Senior Processing Executive
29.8k
salaries
| ₹2.2 L/yr - ₹6.5 L/yr |
Technical Lead
19k
salaries
| ₹6 L/yr - ₹21.3 L/yr |
TCS
Infosys
Wipro
Accenture