Salesforce interview questions

309 questions from 41 candidate reports · 2015 to 2024

Online test → Technical → Technical → HR

DSA

Showing 29 of 182 reported in this area

Find the kth largest element in an array
asked 2×mediumPractice this →
Rearrange characters in a string such that no two adjacent characters are the same.
asked 2×mediumPractice this →
Check whether a given string is a palindrome
asked 2×easyPractice this →
Find the maximum sum subarray in an array using Kadane’s Algorithm
asked 2×easyPractice this →
Given an array of integers and a number sum, find the number of pairs of integers in the array whose sum is equal to sum.
asked 2×easyPractice this →
Find the median of a stream of integers.
asked oncemediumPractice this →
Implement a cache of a given fixed size.
asked oncemediumPractice this →
Print all permutations of a given string.
asked oncemediumPractice this →
Implement the LRU (Least Recently Used) Cache.
asked oncemediumPractice this →
Solve and code a problem using Priority Queue.
asked oncemediumPractice this →
Find the level with maximum sum in a binary tree.
asked oncemediumPractice this →
Find an element in a sorted infinitely long array.
asked oncemediumPractice this →
Print all balanced parentheses from a given string.
asked oncemediumPractice this →
Search for an element in a sorted and rotated array.
asked oncemediumPractice this →
Reverse a doubly linked list in groups of given size k.
asked oncemediumPractice this →
Find the longest substring without repeating characters.
asked oncemediumPractice this →
Rotate an m x m matrix by 90 degrees clockwise in-place.
asked oncemediumPractice this →
Connect N ropes with minimum cost using a greedy approach
asked oncemediumPractice this →
Find the next greater number using the same set of digits.
asked oncemediumPractice this →
Find the size of the largest island in a 2-D binary matrix.
asked oncemediumPractice this →
Find the Longest Common Subsequence (LCS) between two strings.
asked oncemediumPractice this →
Find the row with the maximum number of 1s in a binary matrix.
asked oncemediumPractice this →
Given an array, print all triplets (a, b, c) such that a + b = c.
asked oncemediumPractice this →
Search for an element in a row-wise and column-wise sorted matrix.
asked oncemediumPractice this →
Given a string, determine whether it represents a valid IP address.
asked oncemediumPractice this →
Print the 360-degree view (top view + bottom view) of a binary tree.
asked oncemediumPractice this →
Add two numbers represented by two arrays and return the resulting array.
asked oncemediumPractice this →
Find the length of the longest valid (well-formed) parentheses substring.
asked oncemediumPractice this →
Given a grid of oranges, find the minimum time required to rot all oranges.
asked oncemediumPractice this →

CS fundamentals

Showing 17 of 133 reported in this area

Explain core Object-Oriented Programming concepts such as inheritance, polymorphism, encapsulation, and abstraction
asked 2×easyPractice this →
What is the String Pool in Java?
asked oncemediumPractice this →
Explain indexing in DBMS and its types.
asked oncemediumPractice this →
How are maps internally implemented in C++?
asked oncemediumPractice this →
How is React different from other frontend frameworks?
asked oncemediumPractice this →
What is database normalization and what are its types?
asked oncemediumPractice this →
When you search a URL in a browser, how is data received?
asked oncemediumPractice this →
Explain deadlocks in Operating Systems and related concepts.
asked oncemediumPractice this →
Explain abstraction, interfaces, and friend functions in C++.
asked oncemediumPractice this →
What is the difference between HashMap, Hashtable, and TreeMap?
asked oncemediumPractice this →
Write an SQL query involving data manipulation and optimization.
asked oncemediumPractice this →
Write a SQL query to remove duplicate rows from a database table.
asked oncemediumPractice this →
What are the different ways to create or implement threads in Java?
asked oncemediumPractice this →
Write code to demonstrate a deadlock in a multithreaded environment.
asked oncemediumPractice this →
Explain the internal implementation of HashMap and write code for it.
asked oncemediumPractice this →
How do automation tools like workflows and triggers work in Salesforce?
asked oncemediumPractice this →
Write Java code to demonstrate polymorphism in Object-Oriented Programming.
asked oncemediumPractice this →

Behavioural

Showing 3 of 20 reported in this area

How would you handle situational challenges or decisions at work?
asked oncemediumPractice this →
Justify a chosen technology stack and explain reasons for using it.
asked oncemediumPractice this →
Role-play scenario where you act as a support engineer handling a customer issue.
asked oncemediumPractice this →

Puzzles

Showing 3 of 14 reported in this area

How can you cut a round cake into 8 equal pieces using only 3 cuts?
asked 2×easyPractice this →
How would you estimate the total number of buses in your city?
asked oncemediumPractice this →
Solve the 9 balls puzzle to find the odd ball in the minimum number of steps.
asked oncemediumPractice this →

System design

Showing 5 of 12 reported in this area

Design a TinyURL service
asked oncemediumPractice this →
Design an e-commerce system like Flipkart.
asked oncemediumPractice this →
Design a coffee ordering system (HLD and LLD)
asked oncemediumPractice this →
Explain scalability considerations in system design.
asked oncemediumPractice this →
How would you implement a bidding system and increase its robustness?
asked oncemediumPractice this →

Aptitude

Showing 3 of 8 reported in this area

Find the angle between the hour hand and minute hand of an analog clock at a given time (e.g., 3:15)
asked oncemediumPractice this →
Calculate compound interest for a given principal, rate, and time.
asked onceeasyPractice this →
Find the angle between the hour hand and the minute hand of a clock at 3:15.
asked onceeasyPractice this →

Showing 60 of 309 questions. Ranked by how often the same question came back across reports.

Practise a Salesforce-style interview

A spoken interview built from these questions, scored when you finish; the report is yours.

Start practising

Common questions

What questions does Salesforce ask?

Candidate interview reports most often cover DSA (49%) and CS fundamentals (36%).

How many rounds does Salesforce interview have?

Candidate interview reports show an average of 3.7 rounds per experience, with a typical sequence of Online test → Technical → Technical → HR. Individual interview paths can vary.

Is the Salesforce interview hard?

Among questions with a reported difficulty, the mix is easy 40%, medium 51%, hard 9%.

Keep reading