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

Programmer Analyst

Cognizant
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
I had practiced Data Structures and algorithms which really helped me a lot in getting cleared Cognizant coding round for Gen-c role. I used to participate in the various competitive coding contest on codeforces, codechef and leetcode which helped me in solving problems in the given problem.
Application story
I applied in Infytq, coding contest organised by Infosys, There were 3 coding questions , medium to hard level , I was able to solve only 2 question full and one with just some test cases .Then I was shortlisted for interview after 1 months . Interview happened.
Why selected/rejected for the role?
I got selected because I solved all the coding problems.though I wasn't selected for genc role because i wasn't able to give the most optimized approach
Preparation
Duration: 6 Months
Topics: Data Structures , Java , Python , ML , DBMs
Tip
Tip

Tip 1 : Firstly pic any coding language and learn all basic concepts
Tip 2 : Then start learning diff Data Structures and practise at least 50 questions on each data structure with learnt coding language.
Tip 3 : Also prepare DBMS , OS and OOPs concepts for placement preparation.

Application process
Where: Campus
Eligibility: 70%
Resume Tip
Resume tip

Tip 1 : Mention only skills which you really have 
Tip 2 : Clearly mention projects which you have done

Interview rounds

01
Round
Easy
Online Coding Test
Duration180 minutes
Interview date2 Sep 2021
Coding problem3

1. Sort An Array of 0s, 1s and 2s

Easy
10m average time
90% success
0/40
Asked in companies
SamsungDirectiZS

You have been given an array/list 'arr' consisting of 'n' elements.


Each element in the array is either 0, 1 or 2.


Sort this array/list in increasing order.


Do not make a new array/list. Make changes in the given array/list.


Example :
Input: 'arr' = [2, 2, 2, 2, 0, 0, 1, 0]

Output: Final 'arr' = [0, 0, 0, 1, 2, 2, 2, 2]

Explanation: The array is sorted in increasing order.
Try solving now

2. Compress the String

Moderate
25m average time
60% success
0/80
Asked in companies
AdobeMathworksHarman International

Ninja has been given a program to do basic string compression. For a character that is consecutively repeated more than once, he needs to replace the consecutive duplicate occurrences with the count of repetitions.

Example:

If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".

The string is compressed only when the repeated character count is more than 1.

Note :

The consecutive count of every character in the input string is less than or equal to 9.
Try solving now

3. DBMS Question

Write the steps to create, update and drop a view in SQL.

Problem approach

CREATE VIEW View_Name AS
SELECT Column1, Column2, Column3, ..., ColumnN
FROM Table_Name
WHERE Condition;

02
Round
Easy
Video Call
Duration60 minutes
Interview date1 Oct 2021
Coding problem3

1. Merge Two Sorted Arrays

Moderate
15m average time
85% success
0/80
Asked in companies
AmazonOlaTata Consultancy Services (TCS)

Ninja has been given two sorted integer arrays/lists ‘ARR1’ and ‘ARR2’ of size ‘M’ and ‘N’. Ninja has to merge these sorted arrays/lists into ‘ARR1’ as one sorted array. You may have to assume that ‘ARR1’ has a size equal to ‘M’ + ‘N’ such that ‘ARR1’ has enough space to add all the elements of ‘ARR2’ in ‘ARR1’.

For example:

‘ARR1’ = [3 6 9 0 0]
‘ARR2’ = [4 10]
After merging the ‘ARR1’ and ‘ARR2’ in ‘ARR1’. 
‘ARR1’ = [3 4 6 9 10]
Try solving now

2. Operating System Question

What are threads?

3. Puzzle Question

The Speed of river is 5 kmph. A stationary body is placed in the river. Find the time taken by the floating body to reach a stone which is 10 km downstream from the point where it is now?

03
Round
Easy
HR Round
Duration15 minutes
Interview date6 Oct 2021
Coding problem1

Basic Hr Questions

1. Basic HR Questions

1. Tell me about yourself.
2. Why do you want to work for our company?
3. What is your biggest achievement so far?

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
843 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
869 views
1 comments
0 upvotes
company logo
Programmer Analyst
3 rounds | 8 problems
Interviewed by Cognizant
952 views
0 comments
0 upvotes