Question: Salesforce, Recent Online Assessment Questions | Workflow Configuration | Safe Passwords | Feb2026
0
Entering edit mode

Question 1: Salesforce Workflow Configuration

Problem Statement:

Given a Salesforce workflow configuration string config consisting of digits (0-9) and placeholders (?), determine the number of ways the placeholders can be replaced with digits (0-9) such that no two adjacent workflow steps (digits) are the same.

Since the answer can be very large, return the answer modulo 10^9 + 7.

Example:

config = "1?3?"

  • The first placeholder (?) can be replaced with 8 possible digits: {2, 4, 5, 6, 7, 8, 9, 0} (all digits except 1 and 3).
  • The second placeholder can be replaced with 9 possible digits: {1, 2, 4, 5, 6, 7, 8, 9, 0} (all digits except 3).

This results in a total of 72 possible configurations.

 

Question 2: Safe Salesforce Passwords

Problem Statement:

Salesforce provides a secure system for organizations to manage their accounts and data. A password is considered safe if it satisfies the following criteria:

  1. The length of the password is exactly n.
  2. The password consists of lowercase English characters only.
  3. The password does not contain k or more consecutive identical characters.

Given the integers n (password length) and k (maximum allowed consecutive identical characters), calculate the total number of distinct safe passwords that can be generated. Since the number can be large, return the result modulo 10^9 + 7.

Example:

n = 2, k = 2

The total number of passwords of length 2 is 26 \times 26 = 676. There are 26 cases where k=2 consecutive characters are the same (e.g., "aa", "bb"). Thus, the answer is 676 - 26 = 650. Output is 650.

Question 3: Salesforce Data Collection

Problem Statement:

A Salesforce administrator is working on optimizing data collection for Opportunity records across multiple branches. The branches follow a hierarchical structure, forming a tree with n nodes labeled from 0 to n-1.

An array opportunityData of size n indicates whether a branch contains important Opportunity data. Specifically, opportunityData[i] is 1 if branch i holds relevant data and 0 otherwise.

To gather all Opportunity data, the admin must navigate through the branches using bidirectional paths (edges). The goal is to minimize the total distance traveled. Any data within a radius of 2 edges from a branch can be collected. For system consistency, the retrieval process must start and end at the same branch.

Determine the minimum number of edges the admin needs to traverse to collect all Opportunity data.

 

Login before adding your answer.

Similar Posts
Loading Similar Posts