Add office photos
American Express logo
Employer?
Claim Account for FREE

American Express

4.2
based on 3.1k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Software Developer
Clear (1)

10+ American Express Software Developer Interview Questions and Answers

Updated 12 Nov 2024

Q1. 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
Ans.

Find the maximum sum of a subsequence without choosing adjacent elements in an array.

  • Use dynamic programming to keep track of the maximum sum at each index, considering whether to include or exclude the current element.

  • At each index, the maximum sum can be either the sum of the current element and the element two positions back, or the sum at the previous index.

  • Iterate through the array and update the maximum sum accordingly.

  • Example: For input [3, 2, 7, 10], the maximum non-a...read more

Add your answer
right arrow

Q2. Word Break Problem Statement

You are given a list of N strings called A. Your task is to determine whether you can form a given target string by combining one or more strings from A.

The strings from A can be u...read more

Ans.

Given a list of strings, determine if a target string can be formed by combining one or more strings from the list.

  • Iterate through all possible combinations of strings from the list to form the target string.

  • Use recursion to try different combinations of strings.

  • Check if the current combination forms the target string.

  • Return true if a valid combination is found, otherwise return false.

Add your answer
right arrow

Q3. All Paths From Source Lead To Destination Problem Statement

In a directed graph with 'N' nodes numbered from 0 to N-1, determine whether every possible path starting from a given source node (SRC) eventually le...read more

Ans.

Determine if all paths from a source node lead to a destination node in a directed graph.

  • Check if there is at least one path from source to destination.

  • If a node has no outgoing edges, it should be the destination.

  • Ensure the number of paths from source to destination is finite.

  • Traverse the graph to validate all paths lead to the destination.

Add your answer
right arrow

Q4. Find All Anagrams Problem Statement

Given a string STR and a non-empty string PTR, identify all the starting indices of anagrams of PTR within STR.

Explanation:

An anagram of a string is another string that can...read more

Ans.

Given a string STR and a non-empty string PTR, find all starting indices of anagrams of PTR within STR.

  • Create a frequency map of characters in PTR.

  • Use sliding window technique to check anagrams in STR.

  • Return the starting indices of anagrams found.

Add your answer
right arrow
Discover American Express interview dos and don'ts from real experiences

Q5. Ninja And The Tree Problem Statement

Ninja, while learning Binary Search Trees (BST), accidentally swapped two nodes in her self-constructed BST. Your task is to help Ninja by correcting the BST so that all pro...read more

Ans.

The task is to correct a Binary Search Tree by swapping two nodes in the tree.

  • Parse the input level order tree and construct the BST

  • Identify the two nodes that are swapped incorrectly

  • Swap the values of the incorrectly swapped nodes to correct the BST

  • Return the corrected BST in level order form

Add your answer
right arrow

Q6. Maximum Sum With Specific Difference Problem Statement

Given an array of integers and a number 'K', your task is to find the maximum possible sum of disjoint pairs of numbers where the absolute difference betwe...read more

Ans.

Find maximum sum of disjoint pairs with absolute difference less than K in an array.

  • Iterate through the array and sort it.

  • Find all possible disjoint pairs with absolute difference less than K.

  • Calculate the sum of these pairs to get the maximum sum.

Add your answer
right arrow
Are these interview questions helpful?
Q7. How can you detect a loop in a linked list?
Ans.

A loop in a linked list can be detected using Floyd's Cycle Detection Algorithm.

  • Use two pointers - slow and fast, where slow moves one step at a time and fast moves two steps at a time.

  • If there is a loop, the two pointers will eventually meet at some point within the loop.

  • To detect the start of the loop, reset one pointer to the head and move both pointers one step at a time until they meet again.

Add your answer
right arrow

Q8. find if array of numbers, which are prime, using streams

Ans.

Use streams to find prime numbers in an array

  • Use Java streams to filter out non-prime numbers from the array

  • Check if a number is prime by dividing it by all numbers less than its square root

  • Create a method to check if a number is prime

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. Spring java and how do you leverage in your project

Ans.

I leverage Spring Java for dependency injection, MVC framework, and transaction management in my projects.

  • Utilize Spring's dependency injection to manage object dependencies and improve code maintainability

  • Leverage Spring MVC framework for building web applications with clean separation of concerns

  • Use Spring's transaction management to ensure data integrity and consistency in database operations

Add your answer
right arrow

Q10. How to implement security in microservices

Ans.

Implement security in microservices by using authentication, authorization, encryption, and monitoring.

  • Use authentication mechanisms like OAuth, JWT, or API keys to verify the identity of clients accessing the microservices.

  • Implement authorization controls to define what actions users can perform within the microservices.

  • Encrypt data in transit and at rest using protocols like HTTPS and TLS, and tools like Vault or AWS KMS.

  • Implement monitoring and logging to detect and respon...read more

Add your answer
right arrow

Q11. A program to print 1 to n prime numbers

Ans.

Program to print 1 to n prime numbers

  • Iterate from 2 to n and check if each number is prime

  • Use a function to check if a number is prime

  • Print the prime numbers found

Add your answer
right arrow

More about working at American Express

Back
Awards Leaf
AmbitionBox Logo
Top Rated Large Company - 2024
Awards Leaf
Awards Leaf
AmbitionBox Logo
Top Rated Company for Women - 2024
Awards Leaf
Awards Leaf
AmbitionBox Logo
Top Rated Financial Services Company - 2024
Awards Leaf
HQ - New York City,New York, United States
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at American Express Software Developer

based on 8 interviews
1 Interview rounds
Coding Test Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

Adobe Logo
3.9
 • 67 Interview Questions
LinkedIn  Logo
4.3
 • 36 Interview Questions
Siemens Logo
4.1
 • 25 Interview Questions
Meesho Logo
3.7
 • 11 Interview Questions
View all
Recently Viewed
CAMPUS PLACEMENT
Banasthali University
CAMPUS PLACEMENT
Osmania University
INTERVIEWS
China State Construction Engineering Corporation
No Interviews
INTERVIEWS
Jaro Education
No Interviews
INTERVIEWS
American Express
No Interviews
INTERVIEWS
American Express
5.6k top interview questions
INTERVIEWS
VIKRAN Engineering & Exim
No Interviews
INTERVIEWS
ICICI Securities
No Interviews
INTERVIEWS
The Louis Berger Group
No Interviews
INTERVIEWS
Jaro Education
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter