Salesforce OA
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)
Minimize Removals for Max-Twice-Min Array
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.
Count Palindromic Concatenated String Pairs
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]