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

Network security

Accenture
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
Before applying for this role, I was working at Capgemini as a Network Support Engineer. I worked for many years in the companies and I got to learn alot by working there as a software developer. As soon as I saw a job opening for Accenture, I started preparing DSA again. I went through previous interview experiences and started giving mock interviews so as to master coding skills once again.
Application story
I saw a job opening on the company's website. I reached out to a lot of people on LinkedIn for referral. One of the employees agreed to give me referral. So, I applied through his referral and then they called me for the interview rounds. The interviews went on smoothly and I got selected.
Why selected/rejected for the role?
I was selected because of my never-give up attitude. I had a different way of approaching questions. I understood the question properly first and then thought of a solution for the question. In this manner, I gave the answers clearly and confidently.
Preparation
Duration: 3 months
Topics: Topics: Data Structures, Algorithms, Database, System Design, Operating Systems
Tip
Tip

Tip 1 : Practice DP based questions as much as you can. Also, be confident during the interview about your solution.
Tip 2 : For practice, you can prefer Coding Ninjas and Geeks For Geeks.

Application process
Where: Linkedin
Eligibility: Need two development projects on Resume
Resume Tip
Resume tip

Tip 1 : Keep it short. Mention the academic and professional projects you've done. Add your educational details properly with percentage or CGPA obtained.
Tip 2 : Must atleast two project.

Interview rounds

01
Round
Medium
Face to Face
Duration60 minutes
Interview date1 May 2022
Coding problem2

1. Maximum Subarray Sum.

Moderate
35m average time
81% success
0/80
Asked in companies
Expedia GroupSnapdealInfo Edge India (Naukri.com)

Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum.

Problem approach

I used Kadane algorithm here to find subarray with maximum sum. It is a standard question for interview.

Try solving now

2. Magical Pattern

Easy
20m average time
80% success
0/40
Asked in companies
Goldman SachsReliance Jio Infocomm LtdAccenture

You have been given an integer 'N'. Your task is to print the Magical Pattern(see examples) for the given 'N'.

Example :

For 'N' : 4
Pattern :
4 3 2 1 2 3 4                                                                   
3 3 2 1 2 3 3                                                                   
2 2 2 1 2 2 2                                                                   
1 1 1 1 1 1 1                                                                   
2 2 2 1 2 2 2                                                                   
3 3 2 1 2 3 3                                                                   
4 3 2 1 2 3 4
Problem approach

I simply use for and while loops with some conditions and printed the required pattern.

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date5 May 2022
Coding problem2

1. DFS Traversal

Moderate
35m average time
65% success
0/80
Asked in companies
SamsungIntuitGoldman Sachs

Given an undirected and disconnected graph G(V, E), containing 'V' vertices and 'E' edges, the information about edges is given using 'GRAPH' matrix, where i-th edge is between GRAPH[i][0] and GRAPH[i][1]. print its DFS traversal.

V is the number of vertices present in graph G and vertices are numbered from 0 to V-1. 

E is the number of edges present in graph G.
Note :
The Graph may not be connected i.e there may exist multiple components in a graph.
Problem approach

As I have to find a number of connected components in an undirected graph so I simply use Depth-first search to solve this question by visiting each element and mapped it to the number of component in which it belongs. At last, I print the vertices of each component.

Try solving now

2. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
NoBrokerIntuitOptum

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Try solving now
03
Round
Medium
Face to Face
Duration50 minutes
Interview date16 May 2022
Coding problem2

1. Count subsequences

Moderate
30m average time
60% success
0/80
Asked in companies
OracleTata Consultancy Services (TCS)Accenture

You have been given an integer array/list 'ARR' of size 'N'. Your task is to return the total number of those subsequences of the array in which all the elements are equal.

A subsequence of a given array is an array generated by deleting some elements of the given array with the order of elements in the subsequence remaining the same as the order of elements in the array.

Note :
As this value might be large, print it modulo 10^9 + 7
Problem approach

For this question, I simply used some mathematics and considered the frequency of each element and their contribution to subsequences. Wrote its fully commented code with neat handwriting.

Try solving now

2. Edit Distance

Moderate
30m average time
70% success
0/80
Asked in companies
HCL TechnologiesOYOGoldman Sachs

You are given two strings 'S' and 'T' of lengths 'N' and 'M' respectively. Find the "Edit Distance" between the strings.

Edit Distance of two strings is the minimum number of steps required to make one string equal to the other. In order to do so, you can perform the following three operations:

1. Delete a character
2. Replace a character with another one
3. Insert a character
Note:
Strings don't contain spaces in between.
Problem approach

Firstly I gave the interviewer, a recursive solution then he asked me to reduce complexity as it was exponential of recursive solution so I gave him a top-down DP solution.

Try solving now
04
Round
Medium
Face to Face
Duration25 minutes
Interview date23 May 2022
Coding problem1

1. Common Digit Longest Subsequence

Moderate
31m average time
0/80
Asked in companies
LinkedInAmazonSamsung

You have been given an array of 'N' Integers. Find the length of the longest subsequence such that each adjacent element of the subsequence has at least one digit in common.

Note :
A sequence 'A' is a subsequence of a sequence 'B' if 'A' can be obtained from 'B' by deletion of several (possibly, zero) elements. For example, [3,1] is a subsequence of [3,2,1] and [4,3,1], but not a subsequence of [1,3,3,7] and [3,10,4].
Problem approach

I initially tried a 2D DP solution where dp[i][j] indicates the length of the longest sequence with ending at i containing j as a digit. It’s a N X 10 DP matrix. The interviewer asked me why I needed a 2D DP solution and I struggled to convince him. I wrote the code for it. It wasn’t completely correct. I was missing something. After thinking for a while I narrowed down to a solution containing only 10 elements dp[0], dp[1], dp[2].. dp[9] which is updated every time I see a new number. I take a number, I go through all digits in the number and find value = 1 + max(dp[d] for all digits d in the number). Set this value to dp[d] for all digits in the number. He gave a hint to take the max and finally gave a solution to the interviewer and he was satisfied with that solution.

Try solving now

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
Associate Software Developer
3 rounds | 4 problems
Interviewed by Accenture
6617 views
2 comments
0 upvotes
company logo
Software Developer
2 rounds | 3 problems
Interviewed by Accenture
5351 views
0 comments
0 upvotes
company logo
Application Development Associate
3 rounds | 7 problems
Interviewed by Accenture
4150 views
1 comments
0 upvotes
company logo
Application Developer
1 rounds | 5 problems
Interviewed by Accenture
20329 views
3 comments
0 upvotes