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

SDE - 1

Cognizant
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
For DSA preparation, I solved around 300 problems from platforms like GFG, Leetcode, CodeStudio, etc., and participated in some Leetcode biweekly and weekly contests. Apart from DSA, I prepared for Aptitude and core Computer Science subjects like Operating Systems, Database Management Systems, Computer Networks, and Object Oriented Programming.
Application story
I applied on campus for the role. There was an initial shortlisting through an Online Assessment. For interviews, there were three rounds, 1 Technical and 1 Technical+Managerial,. All interview rounds were conducted on the same day, and the results were announced on the same day
Why selected/rejected for the role?
I was rejected because I was not able to maintain the timing of the questions to be answer I should have been more fast.
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Don't leave any DSA topic; you may get questions from any topic 
Tip 2 : Focus on fundamentals of core CS subjects like OS, CN, DBMS, OOP, as they are very important
Tip 3 : You must be aware of every detail about the projects you have mentioned in your resume

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

Tip 1 : Do not put false things on your resume
Tip 2 : You must be aware of every detail about the projects you have mentioned in your resume

Interview rounds

01
Round
Medium
Online Coding Test
Duration180 minutes
Interview date11 Aug 2021
Coding problem3

1. Copy and Reverse the Array

Easy
10m average time
90% success
0/40
Asked in companies
CognizantAmdocsEncore Capital Group

You are given an array 'ARR' consisting of 'N' non-negative integers, your task is to copy the elements of 'ARR' into another array 'COPY_ARR' in reverse order.

For example:

If 'ARR' contains the following elements [ 1, 2, 3, 4, 5 ], then you should return another array that is equal to [ 5, 4, 3, 2, 1].
Try solving now

2. Relative Sorting

Moderate
25m average time
65% success
0/80
Asked in companies
MicrosoftVisaAmazon

Given two arrays ‘ARR’ and ‘BRR’ of size ‘N’ and ‘M’ respectively. Your task is to sort the elements of ‘ARR’ in such a way that the relative order among the elements will be the same as those are in ‘BRR’. For the elements not present in ‘BRR’, append them in the last in sorted order.

For example

Consider the arrays as ARR = { 9, 5, 8, 4, 6, 5 } and BRR = { 8, 4, 5 }
The output for the above example  is { 8, 4, 5, 5, 6, 9 }.

Note:

Elements of ‘BRR’ are non repeating.
Try solving now
Easy
10m average time
90% success
0/40
Asked in companies
IntuitDisney + HotstarMicrosoft

Given N pairs of parentheses, write a function to generate and print all combinations of well-formed parentheses. That is, you need to generate all possible valid sets of parentheses that can be formed with a given number of pairs.

Try solving now
02
Round
Hard
Face to Face
Duration60 minutes
Interview date11 Aug 2021
Coding problem2

1. Tiling Problem

Hard
45m average time
0/120
Asked in companies
OlaCognizantAdobe

You have been given a board where there are '2' rows and 'N' columns. You have an infinite supply of 2x1 tiles, and you can place a tile in the following ways:

1. Horizontally as 1x2 tile
2. Vertically as 2x1 tile

Count the number of ways to tile the given board using the available tiles.

Note :
The number of ways might be large so output your answer modulo 10^9 + 7.

Here an example of tile and board for 'N' = 4 :

Tiling Example

Try solving now

2. Paint House

Hard
20m average time
80% success
0/120
Asked in companies
AppleAmazonSamsung

You have been given ‘N’ houses, each house can be painted with any of three colours: green, red and yellow. You are also given a “cost” matrix of ‘N’ * 3 dimension which represents the cost of painting an i-th house (0-th based indexing) with j-th colour. The colour code is as follows: green - 0, red - 1 and yellow - 2. Now, you are supposed to find the minimum cost of painting all houses such that no adjacent houses are painted with the same colour.

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
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