Salesforce OA Experience | Rejected

salesforce logo
salesforce
Rejected
October 12, 202513 reads

Summary

I recently completed a HackerRank Online Assessment for Salesforce, which involved solving two algorithmic problems within a 75-minute timeframe. Unfortunately, I was rejected.

Full Experience

I took the Salesforce Online Assessment on HackerRank, which presented two coding challenges. I had 75 minutes to complete both problems. After submitting my solutions, I later received a rejection.

Interview Questions (2)

Q1
Longest Common Subsequence and Substring
Data Structures & AlgorithmsMedium

Given two strings x and y, return both:

  • The length of their Longest Common Subsequence (LCS).
  • The length of their Longest Common Substring.

Example:

Input: x = "abcde", y = "abfce"
Output: 
LCS length = 3   // "abe" or "ace"
Longest Common Substring length = 2   // "ab"
Q2
String Compression (Character Count)
Data Structures & AlgorithmsMedium

Given a string s, compress it such that consecutive duplicate characters are replaced by the character followed by the count of its repetitions.

If a character appears only once consecutively, just keep the character as it is.

Return the compressed string.

Input: s = "abbcccd"
Output: "ab2c3d"

Explanation:
'a' → single → "a"
'b' → repeated twice → "b2"
'c' → repeated thrice → "c3"
'd' → single → "d"

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!