Cognizant interview experience Real time questions & tips from candidates to crack your interview

Programmer Analyst

Cognizant
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: 1. Networking2. DSA3. Common coding questions4. OS concepts5. Web frameworks
Tip
Tip

Tip 1 : Lot of dsa practice
Tip 2 : theory questions of networking/OS
Tip 3 : yt tutorials on brute force/optimized for coding questions

Application process
Where: Campus
Eligibility: above 7 CGPA, and no pending backlogs
Resume Tip
Resume tip

Tip 1 : Be solid with whatever you put there
Tip 2 : 1 line descriptions of your projects/intern/trainings will help you get shortlisted

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date8 Aug 2022
Coding problem1

1. Squares of a Sorted Array

Easy
15m average time
85% success
0/40
Asked in companies
AmazonUberCognizant

You are given an array/list ‘ARR’ of ‘N’ integers. You have to generate an array/list containing squares of each number in ‘ARR’, sorted in increasing order.

For example :

Input:
‘ARR’ = [-6,-3, 2, 1, 5] 

If we take a square of each element then the array/list will become [36, 9, 4, 1, 25].
Then the sorted array/list will be [1, 4, 9, 25, 36].

Output :
[1, 4, 9, 25, 36].
Problem approach

We need to find the points from where the array value starts increasing. Once we reach that point then we can iterate the array in both the directions and merge it to new array.

Try solving now
02
Round
Easy
Face to Face
Duration60 Minutes
Interview date12 Aug 2022
Coding problem1

It was at 9 AM in the morning. Your room should be empty and dress properly and keep water etc near you., because you can't leave the room during the interview. The interviewer was pretty experienced so didn't waste any time and told me to let him know whatever I don't understand, because until I wouldn't be able to solve the coding question, which was very relaxing.

1. 3Sum

Moderate
15m average time
85% success
0/80
Asked in companies
CiscoMathworksSamsung

You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.

An array is said to have a triplet {ARR[i], ARR[j], ARR[k]} with sum = 'K' if there exists three indices i, j and k such that i!=j, j!=k and i!=j and ARR[i] + ARR[j] + ARR[k] = 'K'.

Note:
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Problem approach

It is very similar to the previous 3 Sum problem. Instead of looking of 3 numbers whose sum equals 0,You just look for smallest difference between the sum of the 3 numbers and "Sum".

Then I described the logic, and didn't need to code it since interviewer was convinced with the approach

Try solving now
03
Round
Easy
HR Round
Duration30 Minutes
Interview date15 Aug 2022
Coding problem1

Work experience | project management | initiatives in college

1. Basic HR questions

1. Were you part of any college society, if so what did you do during your tenure.
2. What was your role during your internship
3. how did you tackle conflicting perspectives in your team

Problem approach

Tip 1: These come with real experience
Tip 2: you can watch sample hr round interviews on yt
Tip 3: Convey your view with confidence

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

To make an AI less repetitive in a long paragraph, you should increase:

Choose another skill to practice
Similar interview experiences
company logo
Programmer Analyst
3 rounds | 4 problems
Interviewed by Cognizant
842 views
0 comments
0 upvotes
company logo
Programmer Analyst
3 rounds | 4 problems
Interviewed by Cognizant
964 views
0 comments
0 upvotes
company logo
Programmer Analyst
2 rounds | 4 problems
Interviewed by Cognizant
868 views
1 comments
0 upvotes
company logo
Programmer Analyst
3 rounds | 8 problems
Interviewed by Cognizant
952 views
0 comments
0 upvotes