Frequently Asked Cognizant Interview Questions
In this article, we will learn about the frequently asked Cognizant interview questions.
Before learning about Cognizant Interview Questions, you should understand why this organization is a good fit for you.
Table of Contents
- About Cognizant
- Cognizant Interview Questions for the HR Round
- Technical Cognizant Interview Questions
About Cognizant
Cognizant Technology Solutions is a US-based multinational company that deals in information technology, consulting and outsourcing. The company has reported $563 million as their net profit by the end of March 2022. This is a 12% growth as compared to the same quarter last year. The company is expecting growth of between 7.2-9.2% in 2022. In the following sections, we will be discussing the HR-related and Cognizant technical interview questions.
Interview Process
The interview drive at Cognizant takes place in two ways: on-campus and off-campus recruitment. There are three rounds in the interview. These include aptitude, programming and HR rounds.
Cognizant Interview Questions For The HR Round
Let us discuss the HR interview questions for those who are interested in getting a job at Cognizant. Let us discuss them.
Q1. Why should we hire you?
Ans. This is an important question that assesses your confidence level. While answering this question, you should have a positive attitude. Talk about your positive qualities that are relevant to the workplace. A sample answer would be:
“I believe that I am a good fit for this role since I always accept challenges in projects. As this job role demands pressure handling individuals, I will be able to perform well.”
Q2. How long would you expect to work for us?
Ans. Do not set a timeline for this since companies expect employees to stay for the long term. If you answer within a shorter deadline, then it would put you in a negative position. Let us take two sample answers.
“I plan to stay with the company till the time I get the opportunity to put my skills to use.” or “I look forward to staying for the long term so that I can explore my capabilities to their full potential.”
Q3. What are your interests?
Ans. Talk about your actual interests since interviewers can go into its detail. Your interests should reflect the positive part of your personality.
“I like reading and travelling. I also like to upgrade my skills through courses in my spare time.”
Q4. What do you do to improve your knowledge?
Ans. You should talk about the resources that you refer to improve your knowledge. You can talk about courses, lectures, videoes, podcasts and books.
Q5. What are your strengths and weaknesses?
Ans. You should talk about the positive attributes of your personality that appear as both strengths and weaknesses. You can talk about being able to work as a team member, and your ability to work within deadlines. Talk about weaknesses that do can work for the benefit of the company such as being a workaholic or being a realist.
Best-suited Interview preparation courses for you
Learn Interview preparation with these high-rated online courses
Technical Interview Questions For Freshers and Experienced Candidates
These Cognizant interview questions will ensure that you can clear this round of the interview process. These include coding questions and other technical questions. Many questions are based on the interview experience of candidates. Let us discuss them.
Q1. What is the difference between RSA and DSA?
Ans. Following are the differences between RSA and DSA:
RSA | DSA |
It is a cryptosystem algorithm. | It is a digital signature algorithm. |
Applications in secure data transmission. | Applications are in digital signature and its verification. |
Implements the concept of factorization of the product of two large prime numbers. | Implements the concept of discrete logarithm and modular exponentiation. |
Slower in key generation than DSA. | Faster in key generation than RSA. |
Faster in encryption but slower in decryption than DSA. | Slower in encryption but faster in decryption than RSA. |
Q2. Can we «resurrect» an object that is eligible for garbage collection in Java?
Ans. Yes, you can do so but only once. It is possible to technically “resurrect” an object in finalize method. This can be done by assigning it to a static field. The object will revive and become ineligible for garbage collection.
This prevents its collection in the next cycle. The object will be marked as finalized and finalize method will not be invoked when the object again becomes eligible.
Q3. How are linked lists more efficient than arrays?
Ans. A linked list is more efficient than arrays in the following ways:
- For insertion and deletion, we only need to update the address present in the next pointer of a node.
- No need to provide an initial size during the time of creation since it can grow and shrink at runtime by allocating and deallocating memory.
- No memory is wasted since it is allocated during the runtime.
Q4. Explain monkey patch in Python.
Ans. In Python, monkey patches are dynamic alterations of a class or module. We can alter the behaviour of a code at runtime. Let us take an example:
# m.pyclass A: def func(self): print (“func() is called”)
In the code, we have used the above module (m) to alter the behaviour of func() at runtime. This is done by assigning a new value.
Output:
import mdef monkey_func(self): print (“monkey_func() is now called”)# we are replacing address of “func” with “monkey_func”m.A.func = monkey_funcob = m.A()# calling function “func”ob.func()
monkey_func() is now called
Here, we assigned monkey_func to the address of “func” of the class A. Whenever we call “func” function of “ob”, monkey function is called.
Check Out the Best Online Courses
Q5. How does the HashMap handle collisions in Java?
Ans. The java.util.HashMap class uses chaining to handle the collisions. In chaining, if new values with the same key are attempted to be pushed, these values are stored in linked list that is stored in bucket of key as a chain with the existing value.
If in the worst-case, every key may have the same hashcode resulting in the hash table turn into a linked list. In such a case, searching a value will take O(n) complexity as opposed to O(1) time due to the linked list nature. Hence, one needs to take care while selecting hashing algorithm.
Q6. What is the Hamming Code?
Ans. It is a set of error-correction codes that arise when data is transferred from one source to another. They can detect one-bit and two-bit errors and rectify one-bit errors without the detection of uncorrected errors. These codes achieve the highest possible rate for codes with the block length and minimum distance of three.
Q7. When does a checkpoint occur in DBMS?
Ans. A checkpoint reduces the amount of work during a restart in event of subsequent crashes. These help in the recovery of database after the system crashes. We use checkpoints when we need to restart the system due to a system crash. This ensures that we do not need to perform transactions from the start.
Q8. How is a constructor different from a method?
Ans. The following points differentiate a constructor from a method.
- Constructor initializes an object whereas method exhibits the functionality of an object.
- Methods are invoked explicitly while constructors are invoked implicitly.
- Constructors do not return any value while the method may return a value.
- A default constructor is provided by the Java compiler when a constructor is not present. There is no default method in case of method.
Check out the top java interview questions and answers
Q9. Write down a program to show the largest number among three numbers using binary minus operator.
Ans. Following is a program to find the largest number among three numbers:
package javaapplication9; import java.util.Scanner;
public class JavaApplication9 {
public static void main(String[] args)
{ Scanner s = new Scanner(System.in);
int x = s.nextInt();
int y = s.nextInt();
int z = s.nextInt();
if(x-y>0 && x-z>0)
System.out.println(“Largest is a :-“+x); else if(y-z>0)
System.out.println(“\nLargest is y :-“+y); else System.out.println(“\nLargest is y :-“+z); } }
Q10. Which data structures are used to implement LRU cache?
Ans. LRU cache allows quick identification of an element that is not used for long time by organizing items in the order of use. To achieve this, the following data structures are used:
Queue: This is implemented through a doubly-linked list. The maximum size of a queue is determined through cache size i.e. the total number of available frames. The most recently used pages are towards the rear end of queue while the least recently used page is near the front end of queue.
Hashmap: It stores the page number as key along with the address of the corresponding queue node as value.
Take a look at top javascript interview questions and answers
Q11. How is a router different from a gateway?
Ans. A router connects multiple network segments and directs traffic in the network. It transfers data from source to destination in form of packets. It can send data between similar networks only. A gateway also regulates the network traffic but it can send data between two dissimilar networks.
FAQs
Is Cognizant interview difficult?
It is similar to the interview of other contemporary organizations. You need to have highly strong technical fundamentals related to your domain. This will help you in clarifying any level of interview.
Is there an HR round in the Cognizant interview?
Yes, there is an HR round in Cognizant interview for both on-campus and off-campus placement.
Is Cognizant better than TCS?
Both are very good organizations in different aspects but both offer great work culture and growth opportunities.
Jaya is a writer with an experience of over 5 years in content creation and marketing. Her writing style is versatile since she likes to write as per the requirement of the domain. She has worked on Technology, Fina... Read Full Bio