Salesforce OA

Posted
3 Mar 2026
317 reads

Summary

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

How it went

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]

Questions asked (2)

  1. 01

    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. 02

    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]

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Salesforce recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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