Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Citi Bank interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Citi Bank
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithm, DBMS, Networking,Operating Systems
Tip
Tip

Tip 1 : Practice questions on DS Algorithm ( array/string/DP/trees)
Tip 2 : Prepare OS and Networking.

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

Tip 1 : Practice questions on DS Algorithm ( array/string/DP/trees)
Tip 2 : Practice OS and DBMS concepts

Interview rounds

01
Round
Easy
Online Coding Interview
Duration50 Minutes
Interview date1 Mar 2021
Coding problem1

1. Three Factors

Moderate
25m average time
80% success
0/80
Asked in companies
CognizantAdobeCiti Bank

You are given an array ‘ARR’ consisting of ‘N’ positive integers. Your task is to find if the number has exactly 3 factors for each number in the array ‘ARR’.

You have to return an array consisting of ‘0,’ and ‘1’ where ‘0’ means that ‘ARR[index]’ does not have 3 factors and ‘1’ means ‘ARR[index]’ has exactly 3 factors.

For Example:
If ‘N’ = 4 and ‘ARR’ = [3, 5, 4, 2]. 
3 has 2 factors, which are 1 and 3.
5 has 2 factors, which are 1 and 5.
4 has 3 factors, which are  1, 2 and 4.
2 has 2 factors, which are 1 and 2.
Hence, the answer is [0, 0, 1, 0].
Try solving now
02
Round
Easy
Face to Face
Duration45 Minutes
Interview date10 Mar 2021
Coding problem1

1. Stock Profits

Moderate
0/80
Asked in companies
AdobeFacebookCiti Bank

You are given a list of stock prices of size 'n' called ‘prices’, where ‘prices[i]’ represents the price on ‘i’th day.


Your task is to calculate the maximum profit you can earn by trading stocks if you can only hold one stock at a time.


After you sell your stock on the ‘i’th day, you can only buy another stock on ‘i + 2’ th day or later.


Example:
Input: 'prices' = [4, 9, 0, 4, 10]

Output: 11

Explanation:
You are given prices = [4, 9, 0, 4, 10]. To get maximum profits you will have to buy on day 0 and sell on day 1 to make a profit of 5, and then you have to buy on day 3  and sell on day 4 to make the total profit of 11. Hence the maximum profit is 11.


Problem approach

We see that S[i] on the day i can be easily computed if we know the closest day preceding i, such that the price is greater than on that day than the price on the day i. If such a day exists, let’s call it h(i), otherwise, we define h(i) = -1. 
The span is now computed as S[i] = i – h(i).

To implement this logic, we use a stack as an abstract data type to store the days i, h(i), h(h(i)), and so on. When we go from day i-1 to i, we pop the days when the price of the stock was less than or equal to price[i] and then push the value of day i back into the stack.

Try solving now
03
Round
Easy
HR Round
Duration30 Minutes
Interview date10 Mar 2021
Coding problem1

Prepared leadership and communication skills

1. Basic HR Questions

1. Introduction

2. Your strengths and weaknesses

3. Where do you see yourself after 5 years?

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you write a single-line comment in C++?

Choose another skill to practice
Start a Discussion
Similar interview experiences
SDE - 1
4 rounds | 3 problems
Interviewed by Citi Bank
2325 views
0 comments
0 upvotes
SDE - 1
3 rounds | 3 problems
Interviewed by Citi Bank
1414 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
1605 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
653 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)
5655 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
4898 views
3 comments
0 upvotes