Salesforce Software Engineer Coding & Algorithms Interview Questions
Practice 22 real Coding & Algorithms interview questions for Software Engineer roles at Salesforce.

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Solve Two OA Coding Problems
The online assessment included two coding problems: 1. In-place character run compression - You are given an array of characters. - Compress con...
Implement a traffic-light UI with JS
Frontend Coding: Traffic Light Build a simple traffic light component using HTML + CSS + JavaScript. Requirements - Render a vertical traffic light wi...
Flatten nested JSON into a string map
Problem You are given an input JSON object that may contain nested objects and arrays. Your task is to flatten it into a single-level key/value mappin...
Maximize events attended given date ranges
You are given n events, where each event i can be attended on any single day within an inclusive range \([start_i, end_i]\). You can attend at most on...
Implement common data-structure and JS tasks
You are given several independent coding tasks that appeared across an OA and frontend-focused interviews. Implement each as specified. 1) Time-based ...
Minimize operations to reduce integer to zero
You are given a non-negative integer n. In one operation: - If n is even, you may replace n with n / 2. - If n is odd, you may replace n with either n...
Implement an LFU cache with O(1) operations
Design and implement an LFU (Least Frequently Used) cache. The cache supports: - get(key): return the value for key if present, else return -1. - put(...
Remove duplicates and find constrained longest subsequence
You are given two independent coding tasks. Task 1: Remove duplicates from a linked list Given the head of a singly linked list (not necessarily sorte...
Solve array duplicate flags and binary swaps
Problem 1: Flag duplicates on the left and right You are given an integer array nums of length n. For each index i, determine: 1. Left-duplicate: whet...
Solve sliding window, heap, DP, in-place tasks
You are given several LeetCode-style coding tasks. Implement each with the stated time/space goals and handle edge cases. 1) Sliding Window: longest s...
Flatten a nested JSON object
Problem You are given a JSON-like value representing an object that may contain: - Objects / dictionaries (string keys) - Arrays / lists - Primitive v...
Find longest subsequence of x that is a substring of y
Given two strings x and y, compute the maximum length of a string s such that: - s is a subsequence of x (can delete zero or more characters from x wi...
Implement an LFU cache
Problem: LFU Cache Design and implement a Least Frequently Used (LFU) cache with a fixed capacity. The cache supports the following operations: - get(...
Remove duplicates from a singly linked list
You are given the head of a singly linked list of integers. Modify the list in place so that it contains only the first occurrence of each value (i.e....
Convert Integer to Non-Adjacent Form
Implement toNAF(n) that converts an integer n (allow negative n) to its Non-Adjacent Form using digits from {-1, 0, 1} with no two adjacent nonzero di...
Remove duplicates in linked list
Question Given a linked list, remove all duplicate values so that each value appears only once. Provide solutions for both sorted and unsorted linked ...
Minimize steps to reduce integer
Given a positive integer n (1 <= n <= 2^61 - 1), in one step you may replace n with n/2 if n is even, or with n+1 or n-1 if n is odd. Return the minim...
Design O(nm) grouping of rearranged strings
Given an array of strings, group together words that are permutations of the same characters. Provide a baseline solution that sorts each word (O(n · ...
Deduplicate a Linked List
Given a singly linked list, remove duplicate values in-place. Variant A (sorted list): delete repeated nodes so each value appears once using O( 1) ex...
Implement 64-bit modular exponentiation safely
Implement a function to compute (a^b) mod m where 0 ≤ a,b < 2^61−1 and 1 ≤ m < 2^61−1 using only 64-bit operations without overflow. Provide implement...