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

Programmer Analyst Trainee

Cognizant
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: C++, Java, OOPs Concepts, SQL, Basic DSA, Computer Networks
Tip
Tip

Tip 1 : Focus on Object Oriented Programming Concepts
Tip 2 : Basic knowledge of Data Structure & Algorithm 
Tip 3 : Should have good understanding of your final year Project

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

Tip 1 : Mention your project honestly.
Tip 2 : Mention limited technology that you are familiar with & have some hands-on practice on it.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration100 minutes
Interview date30 Oct 2019
Coding problem2

Online test in AMCAT. This round consisted of numbers of MCQs over general topics like English, Aptitude, Reasoning, etc and then the interviewer asked me a coding question which was very easy to solve and they ended up asking a puzzle.

1. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
ProtiumQuikrJP Morgan

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Problem approach

Using Binary Search but the binary search needs to be modified to perform the search. The idea is to create a recursive function that takes l and r as a range in input and the key.

Try solving now

2. Puzzle

You are blindfolded and 10 coins are placed in front of you on the table. You are allowed to touch the coins but can’t tell which way up they are by feel. You are told that there are 5 coins head up, and 5 coins tails up but not which ones are which. Can you make two piles of coins each with the same number of heads up? You can flip the coins any number of times. 

Problem approach

Tip 1 : Listen to the problem patiently

Tip 2 : First, create the logic in your mind and then build up the answer

02
Round
Medium
Face to Face
Duration25 minutes
Interview date14 Nov 2022
Coding problem1

They ask OOPs concept, DS algorithms and questions related to my project and one coding question

1. Factorial of a Number

Moderate
25m average time
70% success
0/80
Asked in companies
Wells FargoTata Consultancy Services (TCS)Squadstack

You are given an integer ‘N’. You have to print the value of Factorial of ‘N’. The Factorial of a number ‘N’ is defined as the product of all numbers from 1 to ‘N’.

For Example:
Consider if ‘N’ = 4, the Factorial of 4 will be the product of all numbers from 1 to 4, which is 1 * 2 * 3 * 4 = 24. Hence, the answer is 24.
Problem approach

Make a formula for factorial and use recursion for the same.

Try solving now
03
Round
Easy
HR Round
Duration15 minutes
Interview date14 Nov 2022
Coding problem1

It was a HR round. Normal HR questions were asked in this round

1. Basic HR Questions

  • Tell me about yourself
  • Explain the projects mentioned in your project.
  • Have you done any internships? If yes, Explain the role you fulfilled there?
  • Are you willing to relocate?
Problem approach

Tip 1 : Never say No to re-allocation, until some Valid reason is there
Tip 2 : Always be confident and act as a good listener

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
3 rounds | 7 problems
Interviewed by Cognizant
925 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