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

Software Engineer

Cognizant
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
See, life isn't about the number of breaths you take; it's about the moments that take your breath away. Believe in your knowledge system and the base you've laid all these years. The theoretical knowledge should be on point, and the projections shall sail via communication to the flair of words to the world beyond! Learn, relearn, and finally unlearn is the motto.
Application story
It was a campus-to-corporate opportunity, and the first array of opportunities was via the university itself. After clearing the application shortlisting round, the next steps were three rounds of examinations, each serving as an elimination round, one after the other, prior to the interview experience, which included technical and HR interviews. Lastly, the final list was rolled out.
Why selected/rejected for the role?
Being selected successfully, I feel holistically, was due to my confidence and self-esteem during the entire epilogue and prologue of the interview, akin to a generic communication between two people. My major key takeaway from this was the confidence and faith in believing to manifest your aspirations into reality!
Preparation
Duration: 10 months
Topics: Data science and analysis, SQL, Computer networks, Data structures and algorithms, Resume building
Tip
Tip

Tip 1: Relearn and address your shortcomings, whether in aptitude or logical reasoning.

Tip 2: Work on projecting and delivering content through your projects.

Tip 3: Communicate through your internships and the knowledge you have gained so far. Be communicative at all times.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Demarcate internship experiences.
Tip 2 : Mention the live projects cum research papers.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date6 Dec 2020
Coding problem2

1. Missing and repeating numbers

Moderate
25m average time
75% success
0/80
Asked in companies
CognizantGoldman SachsMathworks

You are given an array of size ‘N’. The elements of the array are in the range from 1 to ‘N’.

Ideally, the array should contain elements from 1 to ‘N’. But due to some miscalculations, there is a number R in the range [1, N] which appears in the array twice and another number M in the range [1, N] which is missing from the array.

Your task is to find the missing number (M) and the repeating number (R).

For example:
Consider an array of size six. The elements of the array are { 6, 4, 3, 5, 5, 1 }. 
The array should contain elements from one to six. Here, 2 is not present and 5 is occurring twice. Thus, 2 is the missing number (M) and 5 is the repeating number (R). 
Follow Up
Can you do this in linear time and constant additional space? 
Problem approach

The fundamental concept is to tackle the issue using a HashMap. However, there is a catch: the input array has length n, and the numbers in the array range from 0 to n-1. So, a HashMap can be created using the input array. When traversing the array, if element 'a' is found, the value of a%n'th element is increased by n. Divide the a%n'th element by n to obtain the frequency.

Try solving now

2. Reverse the String

Easy
15m average time
85% success
0/40
Asked in companies
ThalesDeutsche BankPaytm (One97 Communications Limited)

You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string.

For example:

 If the given string is: STR = "abcde". You have to print the string "edcba".
follow up:
Try to solve the problem in O(1) space complexity. 
Problem approach

1) Initialize start and end indexes as start = 0, end = n-1.
2) In a loop, swap arr[start] with arr[end] and change start and end as follows: 
start = start +1, end = end – 1.

Try solving now
02
Round
Hard
Face to Face
Duration60 minutes
Interview date13 Dec 2020
Coding problem2

1. Find Number Of Islands

Moderate
34m average time
60% success
0/80
Asked in companies
MicrosoftAmazonUber

You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.

A cell is said to be connected to another cell, if one cell lies immediately next to the other cell, in any of the eight directions (two vertical, two horizontal, and four diagonals).

A group of connected cells having value 1 is called an island. Your task is to find the number of such islands present in the matrix.

Problem approach

Simply gave the interviewer a depth-first search-based approach by visiting adjacent connected components and counting the number of islands. The interviewer was satisfied with my approach.

Try solving now

2. Reverse Stack Using Recursion

Easy
21m average time
80% success
0/40
Asked in companies
RazorpayAmazonCIS - Cyber Infrastructure

Reverse a given stack of 'N' integers using recursion. You are required to make changes in the input parameter itself.


Note: You are not allowed to use any extra space other than the internal stack space used due to recursion.


Example:
Input: [1,2,3,4,5] 
Output: [5,4,3,2,1]

add image

Problem approach

I told him proper algorithm with code on paper to the interviewer. He asked me to dry run the algorithm which I did by taking an example of stack.

Try solving now
03
Round
Easy
HR Round
Duration25 minutes
Interview date13 Dec 2020
Coding problem1

1. Basic HR Questions

Tell me about yourself.
What motivated you to pursue a career in software engineering?
Walk me through your academic projects or internships related to software development.
Which programming languages or technologies are you most comfortable with?
How do you handle tight deadlines and multiple projects simultaneously?

Problem approach

Tip 1 : Be honest and confident.
Tip 2 : Keep a smile on your face.

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
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
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by Cognizant
890 views
2 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