salesforce logo
Salesforce· C++ Software Engineer

Salesforce SE Online Assessment Hackerrank experience

Posted
19 May 2026
88 reads

Summary

I completed the Salesforce C++ Software Engineer online assessment on Hackerrank, solving two questions of easy and medium difficulty within 75 minutes and achieving the required 80% score.

How it went

Recently appeared in hackerrank OA for a C++ Software Engineer Role.

There were 2 questions with easy and medium difficulty to complete in 75 mins with marks 50 and 75 respectively.

Question 1: Almost similar to LC 443. String Compression Input: aaaabeee Output: a4be3 (if char is repeating more than once then only display count)

Question 2: LC 2380. Time Needed to Rearrange a Binary String but with a different context.

Qualification criteria: 80% score

Cheers.

Questions asked (2)

  1. 01

    String Compression with Counts

    Data Structures & Algorithms · Easy

    Given a string, compress it by replacing consecutive repeated characters with the character followed by the count (only if the count is greater than one). Example: Input: aaaabeee Output: a4be3.

    Open the problem
  2. 02

    Time Needed to Rearrange a Binary String (variant)

    Data Structures & Algorithms · Medium

    Similar to LeetCode 2380 – given a binary string, determine the minimum number of seconds required to rearrange the string so that no two adjacent characters are the same, following the operation rules defined in the original problem (the exact context was altered for the interview).

    Open the problem

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!