Skip to content
Related Articles

Related Articles

Cognizant Interview Experience (On Campus)
  • Difficulty Level : Medium
  • Last Updated : 07 Aug, 2019

Round 1:  The first round of the Interview consisted of a basic Preliminary test on English, Aptitude, Logical Reasoning and a Coding section. We were asked to give the test from home with a WebCam enabled desktop. The coding part,

Question 1 (Time allocated for coding:20 mins) :

You are given a number n. You have to print ‘n’ numbers of an alternating sequence consisting of even and odd numbers.

Example: for n=10, the sequence will be: 2, 1, 4, 3, 6, 5, 8, 7, 10, 9

Question 2 (Time allocated: 30 mins):

Find the largest area in a set of rectangular bars.


Round 2: The second round of the Interview was a 1-on-1 F2F technical Interview. The interviewer was very polite and asked me for my resume. I am putting here the questions he asked me.


I: What are classes and objects ?

I: Scanner or BufferedReader and Why?

I: what is the use of static keyword ?

I: static classes and nested classes.

I: Do you know about the collection framework? Tell me about HashMap . Tell me about ArrayList, HashSet vs Treeset.

I: write code on try-catch-finally, throws.

Then came the Data Structure Questions:
I:  write the code for Binary search.

I: Given a set of numbers how would you find two numbers in O(n) time such that their sum is exactly n ? (I told him about the HashMap technique).

I: You are given an array of  numbers and some of them occur more than 1 time and not sorted. How would you print only the distinct numbers?

(1. You can use a count array, 2. You can use a HashSet )

He asked me to wait for the HR round.

Round 3: I was asked some basic HR questions,

1. Why cognizant? (almost all companies ask this question to find out how much a student knows about the company and how much interest does he hold)

2. Tell me about your family.

3. Tell me your strengths and weaknesses, your hobbies etc.

4. Why should we hire you?

5. Tell me something unique about yourself that differs you from rest of the candidates. (probably the toughest HR question because as a freshers I couldn’t see anything unique that differs me from other freshers)

6. Are you willing to relocate ? and if situation demands would you be able to work in night shifts?

Thank you for your time. Please await a response from us within a month. You will be contacted by email.

Write your Interview Experience or mail it to

My Personal Notes arrow_drop_up
Recommended Articles
Page :