i
Cognizant
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Campus Placement and was interviewed in Nov 2024. There was 1 interview round.
I was interviewed in Nov 2022.
Round duration - 60 Minutes
Round difficulty - Easy
2 Coding questions
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
This problem can be solved efficiently by using the technique of hashing. Use a hash_map to check for the current array value x(let), if there exists a value target_sum-x which on adding to the former gives target_sum.
Given an array arr
of integers, your task is to identify the contiguous subarray within the array which has the highest product of its elements. Return this maxi...
1. If there are even number of negative numbers and no zeros, result is simply product of all
2. If there are odd number of negative numbers and no zeros, result is product of all except the negative integer with
the least absolute value.
3. If there are zeros, result is product of all except these zeros with one exceptional case. The exceptional case is when
there is one negative number and all other elements
Round duration - 30 Minutes
Round difficulty - Easy
Few Aptitude questions were asked and few questions on Project were also asked
When two dice are thrown, the total number of sample spaces is 36.
Favourable outcomes = {(1,1),(1,2),(1,4),(1,6),(2,3),(2,3),(2,5),(3,2),(3,4),(4,1),(4,3),(5,2),(5,6),(6,1),(6,5)}
Total number of favourable outcomes = 15
Hence, the probability of getting a sum of prime numbers = 15/36 = 5/12.
Tip 1 : Prepare a brief Summary of your Project
Tip 2 : Don't Copy paste code in your Project
Tip 3 : Prepare a Decent Project and not the ones which are readily available on Google
Tip 1 : Improve Communication Skills
Tip 2 : Do Extra Subjects
Tip 3 : Prepare some Projects
Tip 1 : Do Mention coding profiles in resume
Tip 2 : Do add summary of Projects
I applied via Campus Placement and was interviewed in Jul 2022. There were 5 interview rounds.
One one question form all the chapters
There was a two coding questions
What people are saying about Cognizant
I was interviewed in Nov 2021.
Round duration - 120 minutes
Round difficulty - Medium
MCQs- Aptitude + Quantitative
2 questions came in coding round
Given a N * N
maze with a rat placed at position MAZE[0][0]
, find and print all possible paths for the rat to reach its destination at MAZE[N-1][N-1]
. The rat is allowed to...
This question is solved by backtracking
Create a solution matrix, initially filled with 0’s.
Create a recursive function, which takes initial matrix, output matrix and position of rat (i, j).
if the position is out of the matrix or the position is not valid then return.
Mark the position output[i][j] as 1 and check if the current position is destination or not. If destination is reached print the output matrix and return.
R...
You are given a sorted integer array ARR
of size N
. Your task is to remove the duplicates in such a way that each element appears only once. The outpu...
Create an auxiliary array temp[] to store unique elements.
Traverse input array and one by one copy unique elements of arr[] to temp[]. Also keep track of count of unique elements. Let this count be j.
Copy j elements from temp[] to arr[] and return j
Round duration - 30 minutes
Round difficulty - Easy
Basic Hr Questions were asked. I was also asked about some questions from DS algo + from my projects. I was also asked questions from DBMS
You are given an array of integers. Your task is to sort this array in ascending order using the Quick Sort algorithm.
Quick Sort utilizes a divide and conquer approach where...
The key process in quickSort is partition(). Target of partitions is, given an array and an element x of array as pivot, put x at its correct position in sorted array and put all smaller elements (smaller than x) before x, and put all greater elements (greater than x) after x. All this should be done in linear time.
Tip 1 - Practice At least 250 Questions of DS algo
Tip 2 - Do at least 2 application based projects
Tip 3 - Practice questions with optimized approaches
Tip 1 : Have some application based projects on resume.
Tip 2 : Do not put false things on resume.
Tip 3 : Project should clear and crisp
Cognizant interview questions for designations
I applied via campus placement at Anna University and was interviewed in Sep 2021. There were 3 interview rounds.
Round duration - 180 minutes
This Round consisted of 30 MCQs from various topics like OOPS,JAVA,HTML,CSS,PL/SQL, Operating Systems, DBMS.
After MCQs, there were 4 coding questions and 2 SQL questions.
The difficulty of the first 2 questions was easy and that of 3rd and 4rth was medium.
These questions were from various programming topics such as greedy, dynamic programming, graphs etc.
The entire test duration was 3 hours.
Dynamic programming, greedy algorithm, and graph-based questions.
Dynamic programming: Optimal substructure and overlapping subproblems.
Greedy algorithm: Make locally optimal choices to achieve global optimal solution.
Graph-based: BFS, DFS, shortest path, minimum spanning tree, etc.
Examples: Knapsack problem, Dijkstra's algorithm, Kruskal's algorithm.
They asked me coding questions and questions about my project. Since most of my projects were based on Machine Learning, they asked a few ML based question as well.
Program to perform Binary search on an array of N numbers.
Sort the array in ascending order
Set low and high variables to the first and last index of the array respectively
Calculate the mid index as (low+high)/2
If the element at mid index is equal to the search element, return mid
If the element at mid index is less than the search element, set low to mid+1
If the element at mid index is greater than the search element, s...
Program to perform Merge sort on an array of N numbers.
Divide the array into two halves recursively
Sort the two halves using merge sort
Merge the two sorted halves
Repeat until the entire array is sorted
Time complexity: O(nlogn)
Creating a machine learning model involves data preparation, model selection, training, evaluation, and deployment.
Data preparation involves cleaning, transforming, and splitting the data into training and testing sets.
Model selection involves choosing the appropriate algorithm and hyperparameters for the problem.
Training the model involves feeding the training data to the algorithm and adjusting the parameters to mini...
Regularization techniques are used to prevent overfitting in machine learning models.
L1 regularization (Lasso)
L2 regularization (Ridge)
Elastic Net regularization
Dropout regularization
Early stopping
Data augmentation
Batch normalization
Poison distribution refers to the spread of toxic substances through various means.
Poison distribution can occur through intentional or accidental means.
Examples include the distribution of poison through food or water, or the release of toxic chemicals into the environment.
Poison distribution can have serious health consequences and may require immediate medical attention.
Prevention measures such as proper storage and...
Gradient descent is an optimization algorithm used to minimize the cost function of a machine learning model.
Start with an initial guess for the model parameters
Calculate the gradient of the cost function with respect to each parameter
Update the parameters in the opposite direction of the gradient
Repeat until convergence or a maximum number of iterations is reached
Clustering algorithm groups similar data points together based on their characteristics.
Clustering is an unsupervised learning technique.
It can be used for customer segmentation, image segmentation, etc.
K-means, hierarchical clustering, and DBSCAN are popular clustering algorithms.
The choice of algorithm depends on the data and the problem at hand.
PCA stands for Principal Component Analysis. It is a statistical technique used for dimensionality reduction.
PCA is used to identify patterns in data and reduce the number of variables in a dataset.
It works by transforming the original variables into a new set of variables called principal components.
These principal components are ordered by the amount of variance they explain in the data.
PCA is commonly used in fields...
Virtual DOM is a lightweight copy of the actual DOM used for efficient updates.
Virtual DOM is a concept where a lightweight copy of the actual DOM is created.
ReactJS uses it to efficiently update the UI without re-rendering the entire page.
Virtual DOM compares the previous and current states and updates only the necessary changes.
This results in faster rendering and better performance.
Example: When a user types in a se...
Bounding methods in React are used to limit the scope of a component's updates.
Bounding methods include shouldComponentUpdate, getSnapshotBeforeUpdate, and componentDidUpdate.
shouldComponentUpdate allows a component to decide if it should update based on changes in props or state.
getSnapshotBeforeUpdate allows a component to capture information before a change is made to the DOM.
componentDidUpdate is called after a com...
This was more of a document verification round.
I enjoy reading, hiking, and playing board games.
Reading: I love getting lost in a good book, especially mysteries and thrillers.
Hiking: I enjoy exploring new trails and being out in nature.
Board games: I like playing strategy games with friends and family, like Settlers of Catan and Ticket to Ride.
I struggled to win my first hackathon due to lack of experience and technical skills.
I had limited knowledge of coding and programming languages.
I struggled to come up with a unique and innovative idea.
I had difficulty working in a team and communicating my ideas effectively.
I lacked confidence in my abilities and felt intimidated by the competition.
However, I learned from my mistakes and used the experience to improve...
My favorite technology is artificial intelligence.
AI has the potential to revolutionize various industries
It can automate repetitive tasks and improve efficiency
AI can also help in making better decisions by analyzing large amounts of data
Examples include chatbots, image recognition, and predictive analytics
Get interview-ready with Top Cognizant Interview Questions
Coding test includes 4 programming questions(2 easy 2 moderate) and 2 sql questions(1 easy 1 moderate).
I applied via Campus Placement and was interviewed in Jul 2021. There were 4 interview rounds.
Our project uses technologies such as Python, Django, React, and PostgreSQL. I have also worked with Java and AngularJS.
Python is used for backend development
Django is used as a web framework
React is used for frontend development
PostgreSQL is used as the database management system
I have worked with Java for Android app development
I have worked with AngularJS for frontend development
I applied via campus placement at Shri Vidyanikethan Engineering College, Tirupati and was interviewed in Aug 2021. There was 1 interview round.
I applied via campus placement at UEM Kolkata and was interviewed before Mar 2022. There were 2 interview rounds.
A program to reverse a given name.
Create a variable to store the name
Loop through the name from the last character to the first
Add each character to a new variable
Print the reversed name
I applied via campus placement at Amrita School of Engineering, Bangalore and was interviewed in Sep 2021. There were 3 interview rounds.
based on 3 interviews
2 Interview rounds
Associate
72.2k
salaries
| ₹5.1 L/yr - ₹16 L/yr |
Programmer Analyst
55.5k
salaries
| ₹2.4 L/yr - ₹9.6 L/yr |
Senior Associate
48.5k
salaries
| ₹8.9 L/yr - ₹27.3 L/yr |
Senior Processing Executive
28.9k
salaries
| ₹1.8 L/yr - ₹9 L/yr |
Technical Lead
17.6k
salaries
| ₹5.9 L/yr - ₹24.2 L/yr |
TCS
Infosys
Wipro
Accenture