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

SDE - 1

Cognizant
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data structure and AlgorithmsCompetition Programming
Tip
Tip

Tip 1 : clear all basics
Tip 2 : focus on DSA
Tip 3 : Solve atleast 200 problems

Application process
Where: Campus
Eligibility: Above 6.5
Resume Tip
Resume tip

Tip 1 : atleast 2 projects
Tip 2 : do write internships

Interview rounds

01
Round
Easy
Online Coding Interview
Duration60 Minutes
Interview date5 May 2021
Coding problem2

Proctored environment

1. Balanced parentheses

Moderate
10m average time
90% success
0/80
Asked in companies
CognizantAccenturePayPal

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Problem approach

Declare a character stack S.
Now traverse the expression string exp.
If the current character is a starting bracket (‘(‘ or ‘{‘ or ‘[‘) then push it to stack.
If the current character is a closing bracket (‘)’ or ‘}’ or ‘]’) then pop from stack and if the popped character is the matching starting bracket then fine else brackets are not balanced.
After complete traversal, if there is some starting bracket left in stack then “not balanced”

Try solving now

2. Stack Using Deque

Easy
15m average time
85% success
0/40
Asked in companies
WalmartCognizant

Design a data structure to implement a stack, using only deque (double-ended queue). It should support the following operations :

push(X): Pushes an element X into the stack. Returns true if the element is pushed into the stack, otherwise false.

pop(): Pops the top element from the stack. Returns -1 if the stack is empty, otherwise, returns the popped element.

top(): Returns the topmost element of the stack. In case the stack is empty, it returns -1.

isEmpty() : Returns true if the stack is empty, otherwise false.

size(): Returns the number of elements currently present in the stack.

Following type of queries denote these operations :

Type 1 : for push(X) operation.

Type 2 : for pop() operation.

Type 3 : for top() operation.

Type 4 : for isEmpty() operation.

Type 5 : for size() operation.
Try solving now
02
Round
Easy
HR Round
Duration45 minutes
Interview date21 May 2021
Coding problem2

Face to face HR interview
Make short and simple resume
Add projects and internships

1. Middle Of Linked List

Easy
20m average time
80% success
0/40
Asked in companies
NoBrokerSamsungCognizant

Given a singly linked list of 'N' nodes. The objective is to determine the middle node of a singly linked list. However, if the list has an even number of nodes, we return the second middle node.

Note:
1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Problem approach

Traverse linked list using two pointers. Move one pointer by one and the other pointers by two. When the fast pointer reaches the end slow pointer will reach the middle of the linked list.

Try solving now

2. Basic HR Questions

Tell me about your education background

 Mention in brief about your projects and internships

Problem approach

Tip 1: do little research on company
Tip 2: do not write unnecessary things in resume
Tip 3: be confident

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
SDE - 1
2 rounds | 5 problems
Interviewed by Cognizant
1746 views
1 comments
0 upvotes
company logo
SDE - 1
2 rounds | 6 problems
Interviewed by Cognizant
1760 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 6 problems
Interviewed by Cognizant
1798 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Cognizant
909 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Tata Consultancy Services (TCS)
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
6877 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6240 views
3 comments
0 upvotes