Now practice all your interviews before giving the real one

( Salesforce interview questions )

Salesforce interview questions, and how to answer them.

15 questions candidates report from Salesforce interviews, grouped by topic, with a short note on how to answer each kind. Then say your answers out loud in a practice interview.

5 minutes, no CV needed. A practice round, not Salesforce's own.

What Salesforce interviews ask, in our data

Our bank holds 92 coding questions that candidates report from Salesforce interviews. The topics that come up most: arrays & hashing (13), two pointers (9), dynamic programming, 1-D (8) and graphs (8). Of the 92 coding questions, 13 are easy, 64 medium and 15 hard.

Our data covers coding questions for Salesforce; it says nothing about their other rounds, so we don't guess. These are practice questions based on what candidates report on public, community-kept lists, each written in our own words. RoundAlpha is not linked to Salesforce.

Coding questions
92
Easy / medium / hard
13 / 64 / 15
Top topic
Arrays & hashing
Page data updated
29 November 2026

( Questions )

15 Salesforce questions to practise.

Math & bits

  1. 1

    Fewest Power-of-Two MovesMedium

    Start with a positive integer n. Each move changes the current value by adding or subtracting 2^i, where i is any integer greater than or equal to 0.

  2. 2

    Shrink Character RunsMedium

    An array chars contains characters. Encode every maximal run of consecutive equal characters directly in the original array.

Sliding window

  1. 3

    Longest Unique StretchMedium

    Given a string s, return the length of the longest stretch of consecutive characters in which no character appears twice.

  2. 4

    Small Product SegmentsMedium

    Given an integer array and an integer limit, return the number of nonempty contiguous subarrays whose product is strictly smaller than the limit.

Arrays & hashing

  1. 5

    Group by LettersMedium

    Given a list of words, put words that are made of exactly the same letters, each used the same number of times, into the same group.

  2. 6

    Best Triplet ChoiceEasy

    Given an integer array nums, choose three entries at different positions and return the largest possible product of their values.

Intervals

  1. 7

    Merge RangesMedium

    You are given a list of ranges, each written as [start, end]. Merge every group of ranges that overlap or touch, and return the merged ranges sorted by their start.

Linked list

  1. 8

    Recently Used CacheMedium

    Build a cache that holds at most capacity keys and, once it is full, makes room by throwing out the key that was used longest ago.

Graphs

  1. 9

    Count IslandsMedium

    You are given a map of the sea as a grid of "1"s and "0"s: "1" is land and "0" is water. An island is a group of land cells joined up, down, left or right.

  2. 10

    Course OrderMedium

    There are numCourses courses, numbered from 0 to numCourses - 1. Some courses need others first: prerequisites[i] = [a, b] means you must finish course b before you can take course a.

Two pointers

  1. 11

    Count Mirror SegmentsMedium

    For the input string s, count all contiguous, nonempty sections whose character order is identical in both directions.

  2. 12

    Sums Within a RangeMedium

    You receive a 0-indexed integer array a containing n elements, plus two integer bounds, lo and hi.

  3. 13

    Trapped RainwaterHard

    A row of bars stands side by side, each 1 unit wide; height[i] is the height of bar i. After a heavy rain, water settles in the dips between the bars.

Dynamic programming, 1-D

  1. 14

    Maximum Point CollectionMedium

    You are given an integer array nums. Each move chooses one current element, removes it, and awards points equal to its value.

  2. 15

    Longest Palindrome InsideMedium

    You are given a string s. Return the longest piece of it — a run of letters that sit next to each other in s — that reads the same forwards and backwards (a palindrome).

Want to write the code too? The Salesforce list on our coding practice page runs your answer against hidden tests, in six languages.

Questions

Salesforce interview: questions and answers

What coding questions does Salesforce ask?

Our bank holds 92 coding questions that candidates report from Salesforce interviews. The topics that come up most: arrays & hashing (13), two pointers (9), dynamic programming, 1-D (8) and graphs (8). This page shows 15 of them, grouped by topic.

How hard are Salesforce coding questions?

Of the 92 coding questions, 13 are easy, 64 medium and 15 hard. The level you meet depends on the role and your experience, so practise easy and medium ones until you can explain them out loud, then add hard ones.

Are these the real Salesforce interview questions?

They are practice questions based on what candidates report from Salesforce interviews on public, community-kept lists. Each one is written in our own words. RoundAlpha is not linked to Salesforce, and no list can promise what a given interviewer will ask.

Can I practise a Salesforce interview for free?

Yes. A new account you sign up for yourself gets one short free practice interview. Name Salesforce as the company and the interviewer leans its questions toward that company. You can choose "No CV this time", so no CV is needed. You talk out loud and get a scored report at the end.

Read next

Ready when you are

Say it out loud once before it counts.

A short practice interview with Salesforce named as the company, then a scored report on every answer.

5 minutes, no CV needed. A practice round, not Salesforce's own.