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

Software Engineer

Cognizant
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I am from a CSE background. I joined the coding ninjas C++ course for preparation. This course helped me understand the basics of language and syntax. After this course, I was able to crack multiple companies. During my preparation, I followed CodeStudio and some YouTube courses.
Application story
Cognizant visited our campus for placements. There was a total of 3 rounds in the interview. The application was done through the placement cell of our college and the process was very smooth.
Why selected/rejected for the role?
I was selected in the interviews as I had prepared well. Also I did not lose my confidence when I saw others losing hope.
Preparation
Duration: 2 Months
Topics: Data structures and Algorithms, Computer fundamentals subjects. Basics of every skill that you have written in your resume
Tip
Tip

Tip 1: Don’t panic in the interview, as even if you are not selected, you will learn a lot from your interview experience and perform well in the future. 

Tip 2: Also, I recommend you Coding Ninjas as according to me it is an excellent platform to learn basic coding concepts and to practice coding.

Application process
Where: Campus
Eligibility: 6.5 CGPA
Resume Tip
Resume tip

Tip 1: Write whatever you are sure about and have done that. CGPA plays a good role but is ultimately just an eligibility criterion for some companies. 

Tip 2: Have at least 1 or 2 good projects from which you know everything involved.

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 Minutes
Interview date22 Dec 2019
Coding problem2

This round consist of two questions and we have to solve both the questions to qualify for the next round.

1. Frequency In A Sorted Array

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

You are given a sorted array 'ARR' and a number 'X'. Your task is to count the number of occurrences of 'X' in 'ARR'.

Note :
1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
Try solving now

2. Maximum Subarray Sum

Moderate
25m average time
75% success
0/80
Asked in companies
UberTata Consultancy Services (TCS)Dunzo

Given an array of numbers, find the maximum sum of any contiguous subarray of the array.


For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would take elements 42, 14, -5, and 86.


Given the array [-5, -1, -8, -9], the maximum sum would be -1.


Follow up: Do this in O(N) time.

Try solving now
02
Round
Medium
Face to Face
Duration50 minutes
Interview date23 Dec 2019
Coding problem2

Two coding questions were asked that had a lot of corner cases.

1. Convert Number To Words

Hard
40m average time
75% success
0/120
Asked in companies
AppleFacebookExpedia Group

You are given an Integer ‘N’ you have to convert the integer to words.

For example you are given integer N = 2234 then you have to return the string “two thousand two hundred and thirty four”.

Try solving now

2. Convert Min Heap To Max Heap

Moderate
25m average time
75% success
0/80
Asked in companies
SAP LabsOLX GroupCognizant

You are given an array of size ‘N’ which is an array representation of min-heap.


You need to convert this min-heap array representation to a max-heap array representation. Return the max-heap array representation.


For Example
Corresponding to given min heap : [1,2,3,6,7,8]

It can be converted to the following max heap: [8,7,3,6,2,1]

Try solving now
03
Round
Medium
Face to Face
Duration50 Minutes
Interview date23 Dec 2019
Coding problem2

This was the last round

1. Sum Of Zeroes

Easy
10m average time
80% success
0/40
Asked in companies
RIVIGOCognizantSprinklr

You are given a binary matrix (it contains only 0s and 1s) with dimensions ‘N * M’. You need to find and return the sum of coverages of all zeros of the given matrix.

Coverage for a particular 0 is defined as the total number of ‘1s’ around it (i.e., immediate left, immediate right, immediate up, and immediate bottom positions).

Try solving now

2. Implementation: HashMap

Easy
30m average time
90% success
0/40
Asked in companies
CognizanteBayAmazon

Design a data structure that stores a mapping of a key to a given value and supports the following operations in constant time.

1. INSERT(key, value): Inserts an integer value to the data structure against a string type key if not already present. If already present, it updates the value of the key with the new one. This function will not return anything.

2. DELETE(key): Removes the key from the data structure if present. It doesn't return anything.

3. SEARCH(key): It searches for the key in the data structure. In case it is present, return true. Otherwise, return false.

4. GET(key): It returns the integer value stored against the given key. If the key is not present, return -1. 

5. GET_SIZE(): It returns an integer value denoting the size of the data structure. 

6. IS_EMPTY(): It returns a boolean value, denoting whether the data structure is empty or not. 
Note :
1. Key is always a string value.
2. Value can never be -1.
Operations Performed :
First(Denoted by integer value 1):  Insertion to the Data Structure. It is done in a pair of (key, value).

Second(Denoted by integer value 2):  Deletion of a key from the Data Structure.

Third(Denoted by integer value 3): Search a given key in the Data Structure.

Fourth(Denoted by integer value 4): Retrieve the value for a given key from the Data Structure.

Fifth(Denoted by integer value 5): Retrieve the size of the Data Structure.

Sixth(Denoted by integer value 6): Retrieve whether the Data Structure is empty or not.
Try solving now

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
Software Engineer
2 rounds | 4 problems
Interviewed by Cognizant
1200 views
0 comments
0 upvotes
company logo
Software Engineer
4 rounds | 8 problems
Interviewed by Cognizant
1450 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 3 problems
Interviewed by Cognizant
1044 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 3 problems
Interviewed by Cognizant
974 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
4 rounds | 1 problems
Interviewed by Newgen Software
3195 views
2 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by HashedIn
2575 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Ernst & Young (EY)
0 views
0 comments
0 upvotes