Salesforce Senior+ Software Engineer Interview Experience — Two OA Questions: String Segmentation and Power-of-Two Operations

Salesforce·Software Engineer·Sep 2026
Online AssessmentSenior+medium

Question 1: Minimum Segments with No Repeated Characters

Given a string s, you need to perform the following operation exactly once, then compute the minimum number of non-overlapping, non-empty substrings with no repeated characters that the string can be split into:

  1. Choose any lowercase English letter, and delete every occurrence of it from the string.

Constraints:

  1. 1 <= |s| <= 2 * 10^5
  2. String s consists only of lowercase English letters.

Question 2: Minimum Operations to Reduce N to Zero

Given a positive integer n, in one operation you can add or subtract 2^i (where i >= 0) to/from the current value. Find the minimum number of operations needed to reduce n to 0.

Constraints:

  1. 1 <= n < 2^60

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Salesforce
Role
Software Engineer
Level
Senior+
Rounds
Online Assessment
Difficulty
medium
Interview date
Sep 2026
Questions from this interview
2 questions

Real Salesforce interview experiences

First-hand reports from Salesforce candidates — the rounds, the questions they were asked, and how it went.

All 20 Salesforce interview experiences