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

SDE - 1

Cognizant
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
Being from a tier 3 college I wasn't expecting great companies visiting the campus and hence was regular with my DSA and core subjects. Although I got better offers later in my graduation Cognizant was a very good opportunity to learn and work with the evolving needs of IT industry.
Application story
Cognizant visited our campus in start of our final year. We have to apply on Superset. After few days coding round happened and then few week later they announced the result. The successful candidates then went out for virtual interview.
Why selected/rejected for the role?
As a fresher, they were not looking for much in-depth knowledge but I performed well in my interview and was quite confident with how it went. I also mentioned a few mini projects which were the highlight of the interview.
Preparation
Duration: 4 months
Topics: DSA, DBMS, Pointers, OOPS, System Design, Algorithms, Dynamic Programming, Computer Networks
Tip
Tip

Tip 1 : Focus on basic Data Structures - Arrays, Linked List, String, HashMap, Stack Queue.
Tip 2 : Prepared your Projects very well. They will ask a lot about it. Do 2-3 projects so that you have lot of content to speak about.
Tip 3 : Have some practice on writing codes without any IDE support. Try writing code on Notepad or simply on paper.

Application process
Where: Campus
Eligibility: No Backlogs
Resume Tip
Resume tip

Tip 1 : Focus on Skills
Tip 2 : Make it as crisp as you can.
Tip 3 : Never lie on your resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date29 Sep 2021
Coding problem3

1. Reverse Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
CIS - Cyber InfrastructureInfo Edge India (Naukri.com)Cisco

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Try solving now

2. Rat in a Maze

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

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a square matrix of order 'N' * 'N' where the cells with value 0 represent the maze’s blocked locations while value 1 is the open/available path that the rat can take to reach its destination. The rat's destination is at ('N' - 1, 'N' - 1). Your task is to find all the possible paths that the rat can take to reach from source to destination in the maze. The possible directions that it can take to move in the maze are 'U'(up) i.e. (x, y - 1) , 'D'(down) i.e. (x, y + 1) , 'L' (left) i.e. (x - 1, y), 'R' (right) i.e. (x + 1, y).

Note:
Here, sorted paths mean that the expected output should be in alphabetical order.
For Example:
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1 
Expected Output:
DDRDRR DRDDRR 
i.e. Path-1: DDRDRR and Path-2: DRDDRR

The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
Try solving now

3. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
Expedia GroupSnapdealInfo Edge India (Naukri.com)

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date10 Oct 2021
Coding problem2

1. LCA of three nodes

Easy
20m average time
60% success
0/40
Asked in companies
Paytm (One97 Communications Limited)MicrosoftAmerican Express

You have been given a Binary Tree of 'N' nodes where the nodes have integer values and three integers 'N1', 'N2', and 'N3'. Find the LCA(Lowest Common Ancestor) of the three nodes represented by the given three('N1', 'N2', 'N3') integer values in the Binary Tree.

For example:

For the given binary tree: the LCA of (7,8,10) is 1
Note:
All of the node values of the binary tree will be unique.

N1, N2, and N3  will always exist in the binary tree.
Problem approach

It was a standard question so it was easy to solve

Try solving now

2. Duplicate in Array

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

You are given an array ‘ARR’ of size ‘N’ containing each number between 1 and ‘N’ - 1 at least once. There is a single integer value that is present in the array twice. Your task is to find the duplicate integer value present in the array.

For example:

Consider ARR = [1, 2, 3, 4, 4], the duplicate integer value present in the array is 4. Hence, the answer is 4 in this case.
Note :
A duplicate number is always present in the given array.
Try solving now
03
Round
Easy
HR Round
Duration25 minutes
Interview date25 Oct 2021
Coding problem1

1. Basic HR Questions

Tell me about yourself
What do you know about Cognizant and work culture here?
What are your strengths and weaknesses?
What was your role in the internships you did?

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
SDE - 1
2 rounds | 5 problems
Interviewed by Cognizant
1746 views
1 comments
0 upvotes
company logo
SDE - 1
2 rounds | 6 problems
Interviewed by Cognizant
1760 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 6 problems
Interviewed by Cognizant
1798 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Cognizant
909 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
6877 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6241 views
3 comments
0 upvotes