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

Programmer Analyst

Cognizant
upvote
share-icon
2 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: Html 5, Css 3 , Javascript, Angular , Sql , Data Structures , OOPS
Tip
Tip

Tip 1 : Be Confident 
Tip 2 : Get your basics clear
Tip 3 : Make atleast 2 Projects

Application process
Where: Campus
Eligibility: Na
Resume Tip
Resume tip

Tip 1 : Should be align properly 
Tip 2 : Do not put false things on resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 Minutes
Interview date10 Nov 2021
Coding problem5

The online assessment consists of 2 sections i.e mcq section related to programming skills , aptitude , DSA. 2nd section relted to coding questions. There were around 3 coding questions

1. OS Question

What Is virtual memory

Problem approach

Tip 1 : practice different SQL Queries method

2. Find prime numbers

Easy
15m average time
80% success
0/40
Asked in companies
AdobeSalesforceDeutsche Bank

You are given a positive integer ‘N’. Your task is to print all prime numbers less than or equal to N.

Note: A prime number is a natural number that is divisible only by 1 and itself. Example - 2, 3, 17, etc.

You can assume that the value of N will always be greater than 1. So, the answer will always exist.

Try solving now

3. Minimum Number of Platform Needed

Easy
23m average time
85% success
0/40
Asked in companies
OracleArcesiumQualcomm

You are given the arrival and departure times of N trains at a railway station in a day. You need to find the minimum of platforms required for the railway station such that no train waits i.e No train should wait for the platform to be clear or free.

Try solving now

4. Valid Parentheses

Easy
10m average time
80% success
0/40
Asked in companies
OracleSwiggyAmerican Express

You're given a string 'S' consisting of "{", "}", "(", ")", "[" and "]" .


Return true if the given string 'S' is balanced, else return false.


For example:
'S' = "{}()".

There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Try solving now

5. Puzzle

H.C.F and L.C.M of two numbers are 84 and 21 respectively. If the ratio of the two numbers is 1:4, then the larger of the two numbers is

Problem approach

Let the numbers be x and 4x. Then, x×4x=84×21 ?
x2=84×214? x=21x×4x=84×21 ? x2=84×214? x=21
Hence Larger Number = 4x = 84.

02
Round
Medium
Video Call
Duration30 Minutes
Interview date25 Nov 2021
Coding problem4

The interviewer gave me questions related to DSA and Aptitude. He also ask me questions related to my projects.

1. Maximal AND Subsequences

Moderate
15m average time
85% success
0/80
Asked in companies
JP MorganAmazonCognizant

You are given an array consisting of N integers. You need to find the number of k-element subsequences of the given array where the bitwise AND of the subsequence's elements is maximal. Also, find the maximal AND value.

Example:

Let the array be [1, 3, 6, 7] and K=3. The possible k-element subsequences of the given array are: {1, 3, 6}, {1, 3, 7}, {1, 6, 7}, {3, 6, 7}. Applying AND operation on all possible subsequences we get values: 0, 1, 0, 2 respectively. The maximal AND value of these subsequences is 2, and only 1 subsequence {3, 6, 7} has this value.
Try solving now

2. Number Of Pairs With Given Sum

Moderate
39m average time
60% success
0/80
Asked in companies
SAP LabsAmazonSamsung

You have been given an integer array/list(arr) and a number 'Sum'. Find and return the total number of pairs in the array/list which when added, results equal to the 'Sum'.

Note:
Given array/list can contain duplicate elements.

(arr[i],arr[j]) and (arr[j],arr[i]) are considered same.
Try solving now

3. Puzzle

Mina drives from her home to the nearest bus station at an average speed of 80km/h. From the bus station, she boards a bus that takes to her office at a speed of 120km/h. The entire distance covered by her is 92km, and the entire journey took her 1 hour. Find the distance between the bus station from where she boards the bus and her office.

Problem approach

Let from her home to station distance = X, so,
(X \ 80) + ((92-X)/120) = 1
Solving this X = 183.97 km
So from office to station = 183.97-92 = 91.975 km

4. Puzzle

How many seconds will a 500-meter long train moving with a speed of 63 km/hour, take to cross a man walking at a speed of 3 km/hour in the direction of the train?

Problem approach

train and man is moving in the same direction so the relative speed will be = (63-3) km/hour = 60 km/hour
Then 60 km/hour * 5/18= 50/3 m/sec
Therefore, time = distance/speed
= 500/ (50/3)
= 30 seconds
So the answer is 30 seconds

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