Salesforce OA

salesforce logo
salesforce
March 3, 2026 · 5 reads

Summary

I absolutely struggled during the Salesforce Online Assessment, encountering two challenging algorithmic problems.

Full Experience

Absolutely bottled it.

1. Given an array of elements (n = 10^5), you can perform two operations on them: - Remove an element - Change it to any random integer

Return the minimum no of removals such that the largest element is at most twice the smallest element.

2. Given a list of strings, find the number of pairs (i,j) such that any permutation of the concatenated pairs is a palindrome. [Total length of all strings = 3 * 10^5]

Interview Questions (2)

1.

Minimize Removals for Max-Twice-Min Array

Data Structures & Algorithms

Given an array of elements (n = 10^5), you can perform two operations on them:

  • Remove an element
  • Change it to any random integer
Return the minimum no of removals such that the largest element is at most twice the smallest element.
2.

Count Palindromic Concatenated String Pairs

Data Structures & Algorithms

Given a list of strings, find the number of pairs (i,j) such that any permutation of the concatenated pairs is a palindrome. [Total length of all strings = 3 * 10^5]

📣 Found this helpful? Please share it with friends who are preparing for interviews!

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!