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

Programmer Analyst

Cognizant
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
My name is Vamshi. I had no prior knowledge of coding or programming languages when I first started my B.Tech degree, thus it was challenging for me to get over the barrier of addressing a problem without first seeing the solution. I decided to start learning coding at this time, and I watched multiple YouTube lessons, but I didn't learn anything. I did a Python and DSA course from Coding Ninjas at this time, and it truly helped me to advance my skills. But I kept up as much DSA practice as I could as time went on. After my first year, I started to truly study for the DSA and picked up some basic problem-solving skills. With time and experience, I was able to solve problems considerably faster, and I can honestly state that the "DSA" was the only thing that got me through Cognizant. After submitting my application for an off-campus pool drive and passing the coding tests, I was invited for an interview.
Application story
Our college forwarded the URL to apply for an Cognizant Digital Nurture pool drive that was open to all the colleges in South India. As a result, there were two coding rounds: the first was an online round based on hacker rank, and the second was a technical interview. After advancing through these stages, you are chosen.
Why selected/rejected for the role?
The first two rounds of the interview process had them evaluating my ability to solve problems. I was interested in full stack development and had a solid understanding of DSA. I finished some really good projects in this field, which gave me the chance to show the interviewers my skills.
Preparation
Duration: 4 months
Topics: Python, Java, Data Structures, SQL, OOPS
Tip
Tip

Tip 1: Solve numerous problems on all of the coding platforms at your disposal to enhance your problem-solving abilities.

Tip 2: Before your interview, review the fundamental topics and technologies, and brush up on your technical knowledge.

Tip 3: Exhibit confidence and enthusiasm, and show a thorough understanding of the projects you've completed.

Application process
Where: Campus
Eligibility: Above 7 CGPA or 65% in Graduation.
Resume Tip
Resume tip

Tip 1: Make sure your resume is simple to read and comprehend. To present your facts, use clear headings, bullet points, and succinct words. 

Tip 2: Focus on measurable accomplishments and results rather than just listing your duties at work. Emphasize particular successes and how they affected the organization.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration120 minutes
Interview date10 Jul 2022
Coding problem2

There were just two coding questions, in which one is easy and other is medium and there were also 15 mcqs from Data structures.

1. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
NoBrokerIntuitOptum

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Try solving now

2. Remove Duplicates

Easy
15m average time
80% success
0/40
Asked in companies
CIS - Cyber InfrastructureTata Consultancy Services (TCS)PayPal

Ninja is playing with numbers but hates when he gets duplicate numbers. Ninja is provided an array, and he wants to remove all duplicate elements and return the array, but he has to maintain the order in which the elements were supplied to him.

Try solving now
02
Round
Easy
Face to Face
Duration45 minutes
Interview date25 Aug 2022
Coding problem2

1. Remove K Digits

Moderate
25m average time
75% success
0/80
Asked in companies
SprinklrPaytm (One97 Communications Limited)Adobe

You are given a non-negative integer ‘num’ in the form of a string and provided with an integer ‘k’.


You need to find the smallest integer possible by removing exactly ‘k’ digits from ‘num.’


Note :
‘num’ does not have leading zeros except when ‘num’ equals zero.
Example:
Input: ‘num’ = ‘141’ , ‘k’ = 1.

Output: ‘11’

Explanation: By removing only 1 digit from ‘num’, 3 numbers can be formed: 14, 11, and 41. Out of which 11 is the smallest number.
Note :
You don’t have to print anything. It has already been taken care of. Just implement the given function.
Try solving now

2. Puzzle

"There are 100 doors in a single row that are all closed. You make 100 passes by each door, starting at the first door each time. On the first time you pass, you visit every door, and if it's closed, you open it, and if it's open, you close it. On your second pass by, you only visit every other door, starting from the second door in line so that you're skip-counting the doors by two. The third pass you go to every third door, the fourth pass every fourth door, and so on until you have only passed by the hundredth door. During your last pass by, which of the doors are still open and which ones are closed?"

Problem approach

"For every door you pass, you pass it the same number of times as the divisors in the door's number. For instance, if you pass by door 38, you can find the divisors of 38 as one, two, 19, 38 and so on. Therefore, on your first visit, you open the door, then on the second pass you close it, on your 19th pass you open it and on the 38th visit you close it.
Since 38 isn't a perfect square, it remains closed at the very end. So the solution is that for every door that has a perfect square, you leave it open at the end, while the doors without perfect squares are closed."

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
2 rounds | 3 problems
Interviewed by Cognizant
859 views
0 comments
0 upvotes
company logo
Programmer Analyst
3 rounds | 4 problems
Interviewed by Cognizant
843 views
0 comments
0 upvotes
company logo
Programmer Analyst
3 rounds | 4 problems
Interviewed by Cognizant
964 views
0 comments
0 upvotes
company logo
Programmer Analyst
3 rounds | 8 problems
Interviewed by Cognizant
952 views
0 comments
0 upvotes