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

Programmer Analyst Trainee

Cognizant
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
I Started coding in my 3rd year. started with leetcode easy problems then move on to medium, solved around 150 problems.Cognizant is a very good opportunity to learn and work with the evolving needs of IT industry.
Application story
I applied for this role though on-campus. There was total 3 rounds. 1. Coding Assesment 2. Interview 3. Hr round
Why selected/rejected for the role?
I was selected for Genc role because I was able to give all the answer asked by interviewe and the CTC for this role was 4 LPA
Preparation
Duration: 6 months
Topics: OOPS, DBMS, Java, HTML, CSS, Javascript,
Tip
Tip

Tip 1 : If you are fresher focus on core subjects as well.
Tip 2 : You should be aware of OOPS concepts.
Tip 3 : Practice DSA as much as possible.

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

Tip 1: Prepare well what you write in your resume
Tip 2: Make a decent project.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 min
Interview date1 Oct 2021
Coding problem3

Questions were based upon DSA, Time Complexity, Computer Networks etc

1. Largest Prime Factor

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

You are given a positive integer ‘n’. Your task is to find the largest prime factor of this given positive integer.

Note :
If there is no prime factor of a given integer, then print -1.
Try solving now

2. Reverse Number

Easy
10m average time
90% success
0/40
Asked in companies
CognizantTata Consultancy Services (TCS)Accenture

Ninja is feeling very bored and wants to try something new. So, he decides to find the reverse of a given number. But he cannot do it on his own and needs your help.

Note:

If a number has trailing zeros, then its reverse will not include them. For e.g., the reverse of 10400 will be 401 instead of 00401.
Problem approach

It can be solved using simple while loop and modulus operator

Try solving now

3. Tribonacci Sequence

Moderate
0/80
Asked in companies
OLX GroupCognizant

You are given an integer ‘N’. Your task is to find out the ‘N’th Tribonacci Number. ‘N’th number in the Tribonacci sequence is defined as Tn = T n - 1 + Tn - 2 + Tn - 3. Where T0 = 0, T1 = 1, T2= 1. Return the answer in mod of 109 + 7.

For Example :
You are given ‘N’ = 5, Here we know 0th, 1st and 2nd Tribonacci numbers are 0, 1 and 1 respectively. Therefore we can calculate the 3rd number as 0 + 1 + 1 = 2 and 4th number as 1 + 1 + 2 = 4 and 5th number as 1 + 2 + 4 = 7. Hence the answer is 7.
Follow Up :
Can you solve it in logarithmic time?
Problem approach

Similar to fibonacci numbers

Try solving now
02
Round
Medium
Video Call
Duration40 min
Interview date1 Nov 2021
Coding problem3

Interviewer asked me about my projects, 2 coding questions, Numerical Based upon time and distance.

1. Cycle Detection in a Singly Linked List

Moderate
15m average time
80% success
0/80
Asked in companies
InformaticaUrban Company (UrbanClap)PhonePe

You are given a Singly Linked List of integers. Return true if it has a cycle, else return false.


A cycle occurs when a node's next points back to a previous node in the list.


Example:
In the given linked list, there is a cycle, hence we return true.

Sample Example 1

Try solving now

2. Star Pattern

Easy
10m average time
85% success
0/40
Asked in companies
Tata Consultancy Services (TCS)CognizantPayPal
Pattern for N = 4

picture

The dots represent spaces.
Problem approach

for(int i = 1; i <= n; i++){
for(int j = 1; j <= i; j++){
print("*");
}
}

Try solving now

3. Puzzle

Excluding stoppages, the speed of a bus is 54 kmph and including stoppages, it is 45 kmph. For how many minutes does the bus stop per hour?

Problem approach

10 mins

03
Round
Easy
HR Round
Duration15 min
Interview date4 Nov 2021
Coding problem1

Basic HR questions were asked

1. Basic HR Questions

1. Introduce Yourself
2. Strengh and Weakness
3. What do you know about Cognizant

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
Programmer Analyst Trainee
4 rounds | 6 problems
Interviewed by Cognizant
1173 views
0 comments
0 upvotes
company logo
Programmer Analyst Trainee
2 rounds | 3 problems
Interviewed by Cognizant
1409 views
0 comments
0 upvotes
company logo
Programmer Analyst Trainee
4 rounds | 5 problems
Interviewed by Cognizant
0 views
0 comments
0 upvotes
company logo
Programmer Analyst Trainee
3 rounds | 8 problems
Interviewed by Cognizant
773 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Programmer Analyst Trainee
3 rounds | 4 problems
Interviewed by Newgen Software
812 views
0 comments
0 upvotes