CONTENTS

    My 2025 Salesforce HackerRank Test Questions and How I Passed

    avatar
    Seraphina
    ·November 14, 2025
    ·8 min read
    My 2025 salesforce hackerrank test experience and how I passed the interview

    My Salesforce OA experience this time was quite a roller coaster. I originally thought I hadn’t done very well, but four or five days later I unexpectedly got an onsite invitation. Below, I’m sharing my experience from each round and the questions I encountered. I also compiled several other interview experiences and included them in the post as well. Hopefully this can help others who are preparing.

    I am really grateful for the tool Linkjob.ai, and that's also why I'm sharing my entire OA interview experience here. Having an undetectable AI assistant during the interview is indeed very convenient.

    Salesforce HackerRank Test Format and Questions

    Here’s what the OA process looked like for me:

    Before the OA, the recruiter had a prep call with me and said that the frontend side could test anything, and that I should prepare “a bit of everything.” They told me that as long as my frontend skills were “good enough,” I’d be fine, which honestly felt like they said nothing at all.

    Round 1

    After a few small BQ questions, I got two coding tasks.

    1. The first question was a curry-style problem.

    They gave a simple function:

    addTwoNumbers(a, b) {
        return a + b;
    }

    And then asked me to write addThreeNumbers(a)(b)(c).

    It took me a lot of effort to finish because I didn’t have much structured practice with JS problems. I really recommend practicing on GreatFrontend.

    2. The second question was to build a traffic light using HTML + CSS + JavaScript.

    The timing was:

    • Red: 4 seconds

    • Yellow: 1 second

    • Green: 1 second

    I was stunned. I wasn’t allowed to use React, and CoderPad didn’t support it anyway. Very awkward.

    Round 2: System Design

    This round was… rough. The interviewer really made things difficult for me.

    The task was to design a coffee ordering system, and the interviewer constantly interrupted me.

    He kept insisting that I write SQL for everything. Eventually, I had to tell him that in our workflow, a lot of SQL is handled by the BI team. I’ll admit I’m not great at SQL, but it felt like he just didn’t want me to pass.

    One question he asked that stuck with me was:

    “How would you query a list of all users who have never placed an order?”

    Then he added two more difficult questions:

    1. “Design an accounting system that can determine whether a product is profitable.”

    I was completely frozen. I asked whether he wanted metrics like sales, profit, or margin. He said those were secondary and kept telling me to write a query without explaining what query he even wanted.

    1. A behavioral question: “Tell me about a time when you initiated a migration and persuaded others to support it.”

      I started answering and he immediately interrupted, saying the situation I described was too simple and didn’t matter.

    In the final Q&A, I asked what his team worked on. He said:

    “There’s no point in telling you. You’re not joining my team; you’re just interviewing for general hire.”

    Overall, the experience wasn’t great. But with the help of Linkjob.ai, I still passed. The AI was extremely helpful. It provided answer structures and full code, and it remained completely invisible to the interviewer.

    Undetectable AI Interview Copilot

    Salesforce HackerRank Assessment Experience

    I also collected a few interview experiences during my prep, and I’ve organized them below for reference.

    General SDE Backend OA Experience

    The first round was with a director (and he specifically emphasized he wasn’t the HM, just helping with interviews). It was mainly a deep dive into my resume plus a ton of BQ.

    The second round was an OA, and the questions weren’t difficult:

    1. You are given an array of integers. For each elem, determine if the value appears earlier in the array or appears later in the array. Create 2 binary strings to represent these occurrences, where in the first string 1 represents the number at that location appeared another time earlier in the array and 0 if not, and in the second is the same but for appearing later in the array. Example: [1, 2, 3, 2, 1] output: ["00011", "11000"]

    2. You are given a permutation of integers from 1 to n. For each prefix of the array starting from length k, you need to find the k-th largest value. Example: [4, 2, 1, 3] k = 2 answer = [2, 2, 3]

    SWE Intern OA Experience

    Problem 1: Minimum Replacements to Avoid Adjacent Duplicates

    Description

    Given an array of strings, for each string compute the minimum number of character replacements required so that no two adjacent characters are the same.

    Example

    words = [“add”, “boook”, “break”]

    output = [1, 1, 0]

    Explanation

    • “add” → changed one of the ‘d’ → 1 replacement

    • “boook” → changed the middle ‘o’ → 1 replacement

    • “break” → already valid → 0 replacements

    Approach

    I approached it straightforwardly: split the string into segments of consecutive identical characters.

    For each segment with length L, L // 2 replacements are needed to break it apart. For example:

    • “aa” → length 2 → 1 replacement

    • “aaa” → length 3 → 1 replacement

    • “aaaa” → length 4 → 2 replacements

    Problem 2: Longest Subsequence That Is Also a Substring

    Description

    Given two strings x and y, find the length of the longest subsequence of x that is also a substring of y.

    Example

    x = “hackerranks”

    y = “hackers”

    output = 7  (“hackers”)

    Approach

    At first, I tried a DP solution, but it only passed about half of the test cases. The issue was that DP struggled to satisfy both conditions at the same time:

    • y must be matched contiguously (substring)

    • x can skip characters (subsequence)

    I then switched to a more intuitive method:

    • Enumerate each starting index s in y.

    • From s, use two pointers:

      • i on x, which can move freely (subsequence)

      • j on y, which must move consecutively (substring)

    If the characters match, advance both pointers and increase the length.

    If not, only advance i.

    Take the maximum length over all starting positions.

    This runs in O(n * m) and works well for input sizes up to ~2000.

    Linkjob AI Interview Copilot

    Senior Engineer OA Experience

    Before doing Salesforce’s HackerRank OA, I expected the problems to be very difficult and felt anxious for about five minutes before starting. In the end, luck was on my side and the problems turned out to be relatively simple.

    Problem 1: Linked List

    Given a linked list, remove duplicate values and return the head. I traversed the list and used a set to keep track of seen values. If a value had already appeared, I skipped that node.

    Problem 2: Kth Largest in Subarrays

    This problem was hard to understand at first. Given an array arr of length n containing a permutation of numbers from 1 to n, and a number k, the task was to return an array where for every i ∈ [k, n], the value is the kth largest number in the subarray arr[0~i].

    My solution was to iterate through the array while maintaining a separate sorted array. For each element, I inserted it into the sorted array using binary search to keep it in order.

    PMTS OA Experience

    My interview was obtained through a referral. The HR didn’t call; they sent the HackerRank OA and directly scheduled the HM interview at the same time.

    The HackerRank OA had two problems, and the difficulty was manageable.

    Problem 1: Simple String Processing with HashMap

    • Input:

      • texts[n]: n pieces of text, each may contain multiple words.

      • spamWords[k]: k words marked as spam (case-insensitive).

    • Rule:

      • If a text contains at least two occurrences of spam words (count duplicates), it is labeled as "spam".

      • Otherwise, it is "not_spam".

    • Note: Each occurrence of a spam word counts. For example, if a sentence contains "money" three times, it counts as three occurrences.

    Problem 2: DP with HashMap Optimization for Large Test Cases

    • Given an array of integers power[i], each representing the computing power of a processor:

      • Each processor can be used only once.

      • If a processor with power x is selected, processors with x + 1 or x - 1 cannot be selected.

    • Task: Maximize the sum of the selected processors’ power.

    The HM interview lasted 30 minutes and was purely behavioral questions. Most were standard questions I had seen in previous interview experiences: how to handle conflicts, how to deal with disputes, and how I drive decision-making. Since this was at the PMTS level, I had to show that I could influence the organization. For each question, I needed to provide concrete examples showing what problem was solved, the impact, and the business need.

    A day later, I was told I passed and got scheduled for VO, which consisted of two technical rounds.

    Salesforce HackerRank OA Tips & Strategies

    The Salesforce HackerRank OA can be challenging, but a structured approach helps maximize performance. Here are some tips and strategies based on my experience and general trends observed from multiple roles:

    Focus on Core Knowledge Areas

    The Salesforce OA primarily tests fundamental programming skills and problem-solving abilities. Key areas to review include:

    • Data structures: Arrays, strings, hash maps, sets, and linked lists.

    • Algorithms: Sorting, searching, dynamic programming, and basic recursion.

    • Problem patterns: Sliding window, prefix sums, frequency counting, and simple simulation problems.

    • SQL & API basics: For full-stack or related roles, be familiar with joins, aggregations, and API response handling.

    Having a solid grasp of these topics helps tackle most coding questions efficiently.

    Use Well-Known Interview Preparation Platforms

    Before the OA, I practiced on platforms like:

    • LeetCode: For algorithmic problem-solving.

    • HackerRank practice questions: To get familiar with the environment and coding interface.

    • Front-end/SQL platforms (if relevant): For language-specific exercises or database queries.

    Consistent practice on these platforms helps reduce nervousness during the actual OA and improves coding speed and accuracy.

    Test-Taking Strategies During the OA

    • Time management: Quickly scan all questions first. Start with problems you feel confident about, then tackle the harder ones.

    • Partial credit: Even if a solution is incomplete, make sure the code runs for basic cases; partial credit can make a difference.

    • Edge cases: Pay attention to null, empty inputs, and boundary values.

    Coding Practices and Techniques

    • Think before coding: Outline the algorithm and choose the right data structures first.

    • Readable code: Write clear variable names and modular functions; it reduces debugging time.

    • Debug incrementally: Test logic on small examples before scaling to large inputs.

    • Avoid risky shortcuts: Don’t rely on unfamiliar library functions for critical logic, especially if their behavior isn’t fully understood.

    General Interview Preparation Tips

    • Review past experiences: Understand common problem-solving patterns and practice them repeatedly.

    • Simulate test conditions: Practice solving problems in a timed environment similar to the OA.

    • Learn from multiple roles: Observing OA patterns across Salesforce roles can help identify frequently tested skills.

    FAQ

    How strict is HackerRank’s proctoring?

    HackerRank detects copying, pasting, and switching tabs, and will trigger warnings for these actions.

    Which departments and roles are currently hiring at Salesforce?

    The departments hiring the most right now are AI-related teams, such as Agentforce, and cloud-related teams, such as GCP.

    See Also

    My Journey to Success in the 2025 Palantir Interview

    Leveraging AI Tools to Ace My Microsoft Teams Interview

    Insights from My Oracle Software Engineer Interview in 2025

    Navigating the OpenAI Interview Process: My 2025 Experience

    Preparing for My 2025 Generative AI Interview: A True Account