American Express
10+ Accenture Interview Questions and Answers
Q1. Unique Frequency Problem Statement
Given a string 'STR' with lowercase letters, determine the minimum number of deletions required to ensure that every letter in the string appears a unique number of times.
Exa...read more
Q2. Longest Switching Subarray Problem Statement
Determine the length of the longest contiguous subarray in a given array of positive integers, where the subarray qualifies as 'switching'. An array is defined as sw...read more
Q3. Palindrome Linked List Detection
Given a singly linked list of integers, determine if it is a palindrome. A linked list is considered a palindrome if it reads the same forward and backward.
Example:
Input:
The ...read more
Q4. Longest Substring with At Most K Distinct Characters
Given a string S
of length N
and an integer K
, find the length of the longest substring that contains at most K
distinct characters.
Input:
The first line co...read more
Q5. Sliding Maximum Problem Statement
Given an array of integers ARR
of length 'N' and a positive integer 'K', find the maximum elements for each contiguous subarray of size K.
Example:
Input:
ARR = [3, 4, -1, 1, 5...read more
Q6. Detect and Remove Loop in Linked List
For a given singly linked list, identify if a loop exists and remove it, adjusting the linked list in place. Return the modified linked list.
Expected Complexity:
Aim for a...read more
Q7. Stack using Two Queues Problem Statement
Develop a Stack Data Structure to store integer values using two Queues internally.
Your stack implementation should provide these public functions:
Explanation:
1. Cons...read more
Q8. Travelling Salesman Problem
Given a list of cities numbered from 0 to N-1 and a matrix DISTANCE
consisting of 'N' rows and 'N' columns, representing the distances between each pair of cities, find the shortest ...read more
Q9. Maximum Non-Adjacent Subsequence Sum
Given an array of integers, determine the maximum sum of a subsequence without choosing adjacent elements in the original array.
Input:
The first line consists of an integer...read more
Q10. Interval List Intersection Problem
You are provided with two sorted lists of closed intervals, INTERVAL1
and INTERVAL2
. A closed interval [x, y] (x < y) signifies the set of real numbers z such that x <= z <= y...read more
Q11. Minimum Number of Swaps to Sort an Array
Find the minimum number of swaps required to sort a given array of distinct elements in ascending order.
Input:
T (number of test cases)
For each test case:
N (size of the...read more
Q12. Left View of a Binary Tree Problem Statement
Given a binary tree, your task is to print the left view of the tree.
Example:
Input:
The input will be in level order form, with node values separated by a space. U...read more
More about working at American Express
Top Software Developer Intern Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month