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

SDE - 1

Cognizant
upvote
share-icon
2 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Reasoning and problem solving
Tip
Tip

Tip 1 : Skills are as Important
Tip 2 : Hands on OOPS and Aptitude

Application process
Where: Other
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Highlight your skills
Tip 2 : Mark your percentage as per job profile

Interview rounds

01
Round
Medium
Online Coding Test
Duration50 minutes
Interview date8 Jun 2022
Coding problem5

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Special Numbers

Moderate
25m average time
75% success
0/80
Asked in companies
Morgan StanleyCognizant

A special number is defined as a number in which each digit of the number is between 0 to 5 (both inclusive) i.e. each digit belongs to the set S = {0, 1, 2, 3, 4, 5}.

Given a number N, your task is to find the Nth special number.

Try solving now

2. Count Set Bits

Hard
15m average time
85% success
0/120
Asked in companies
QualcommAmazonHewlett Packard Enterprise

You are given a positive integer ‘N’. Your task is to find the total number of ‘1’ in the binary representation of all the numbers from 1 to N.

Since the count of ‘1’ can be huge, you are required to return it modulo 1e9+7.

Note:
Do not print anything, just return the number of set bits in the binary representation of all integers between 1 and ‘N’.
Try solving now

3. Ninja's Base

Easy
10m average time
90% success
0/40
Asked in companies
AdobeCognizantExotel Techcom Private Limited

One day Ninja asks for one day's leave from his trainer. His trainer agrees with him only if he would complete a task. The task is that Ninja has to find the smallest 'NINJA BASE' of a number ‘N’. We call ‘B >= 2’ a ‘NINJA BASE’, if all digits of ‘N’ base ‘B’ can be written as ‘1s’.

Example :
Suppose given number is ‘13’ so we return ‘3’ as the answer as we can write 13 = 3 ^ 2 + 3 ^ 1 + 3 ^ 0. '3' is the smallest number 'B for which 13 base 'B' is ‘1 1 1’. So, the 'NINJA BASE' of 'N' = 13 is 3.

Given number 'N', your task is to help Ninja find its ‘NINJA BASE’.

Note :
You are not required to print anything explicitly. It has already been taken care of. Just implement the function.
Try solving now

4. Count Frequency

Easy
15m average time
85% success
0/40
Asked in companies
AmazonTata Consultancy Services (TCS)Sprinklr

You are given a string 'S' of length 'N', you need to find the frequency of each of the characters from ‘a’ to ‘z’ in the given string.

Example :

Given 'S' : abcdg
Then output will be : 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
Try solving now
Easy
15m average time
85% success
0/40
Asked in companies
Wells FargoCognizantCodenation

You are given an array 'ARR' consisting of 'N' integers and a non-negative integer 'K'. Consider an operation on the array as replacing every element 'ELE' of the array with 'MX - ELE', where 'MX' is the maximum element of the array. You need to return the updated array, given that this operation is performed on the array exactly 'K' number of times.

Note:

1. The array follows 0-based indexing.
2. Note that after each operation, the next operation will be performed on the updated array i.e the array obtained after the last operation.
Try solving now
02
Round
Hard
HR Round
Duration15 Minutes
Interview date23 Jun 2022
Coding problem1

- Morning time
- Environment was good.
- No
- Interviewer was good

1. Basic HR Questions

1- Describe your responsibilities at your current job.
2- What type of teams have you worked with? What was your role?
3- Describe a time when you experienced conflict with a coworker. How did you handle it?
4- How does this job compare to others you might be interviewing for?
4- What interests you about this role?

Problem approach

Tip 1 : Practice with friends
Tip 2 : Communication skills is must

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
1745 views
1 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Cognizant
971 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)
6876 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6240 views
3 comments
0 upvotes